ASKSAGE: Sage Q&A Forum - RSS feedhttps://ask.sagemath.org/questions/Q&A Forum for SageenCopyright Sage, 2010. Some rights reserved under creative commons license.Wed, 05 Oct 2016 13:04:10 +0200plot error: No X11 DISPLAY variable was sethttps://ask.sagemath.org/question/35071/plot-error-no-x11-display-variable-was-set/Hi, I have to make a plot of the following formula
x,y=var('x, y')
plot3d((x^2)*y-x*y+x*y^3,0,5)
but I obtain error message
> /usr/lib64/python2.7/site-packages/sage/plot/plot3d/parametric_plot3d.py\
> :704: DeprecationWarning: Unnamed
> ranges for more than one variable is
> deprecated and will be removed from a
> future release of Sage; you can used
> named ranges instead, like (x,0,2) See
> http://trac.sagemath.org/7008 for
> details. g, ranges =
> setup_for_eval_on_grid(f,
> [urange,vrange], plot_points)
> Exception in thread "main"
> java.lang.ExceptionInInitializerError
> Caused by: java.awt.HeadlessException:
> No X11 DISPLAY variable was set, but
> this program performed an operation
> which requires it. at
> sun.awt.HeadlessToolkit.getScreenSize(HeadlessToolkit.java:284)
> at
> org.openscience.jmol.app.jmolpanel.JmolPanel.<clinit>(JmolPanel.ja\
> va:173)
> /usr/lib64/python2.7/site-packages/sage/repl/rich_output/display_manager\
> .py:570: RichReprWarning: Exception in
> _rich_repr_ while displaying object: Jmol failed to create file
> '/home/sage/.sage/temp/host/1582/dir_0OP2db/preview.png',
> see
> '/home/sage/.sage/temp/host/1582/tmp_4sBlqC.txt'
> for details RichReprWarning,
> Graphics3d ObjectWed, 05 Oct 2016 10:24:03 +0200https://ask.sagemath.org/question/35071/plot-error-no-x11-display-variable-was-set/Comment by kcrisman for <p>Hi, I have to make a plot of the following formula</p>
<pre><code>x,y=var('x, y')
plot3d((x^2)*y-x*y+x*y^3,0,5)
</code></pre>
<p>but I obtain error message </p>
<blockquote>
<p>/usr/lib64/python2.7/site-packages/sage/plot/plot3d/parametric_plot3d.py\
:704: DeprecationWarning: Unnamed
ranges for more than one variable is
deprecated and will be removed from a
future release of Sage; you can used
named ranges instead, like (x,0,2) See
<a href="http://trac.sagemath.org/7008">http://trac.sagemath.org/7008</a> for
details. g, ranges =
setup_for_eval_on_grid(f,
[urange,vrange], plot_points)
Exception in thread "main"
java.lang.ExceptionInInitializerError
Caused by: java.awt.HeadlessException:
No X11 DISPLAY variable was set, but
this program performed an operation
which requires it. at
sun.awt.HeadlessToolkit.getScreenSize(HeadlessToolkit.java:284)
at
org.openscience.jmol.app.jmolpanel.JmolPanel.<clinit>(JmolPanel.ja\
va:173)
/usr/lib64/python2.7/site-packages/sage/repl/rich_output/display_manager\
.py:570: RichReprWarning: Exception in
_rich_repr_ while displaying object: Jmol failed to create file
'/home/sage/.sage/temp/host/1582/dir_0OP2db/preview.png',
see
'/home/sage/.sage/temp/host/1582/tmp_4sBlqC.txt'
for details RichReprWarning,
Graphics3d Object</clinit></p>
</blockquote>
https://ask.sagemath.org/question/35071/plot-error-no-x11-display-variable-was-set/?comment=35075#post-id-35075Given that your second error is the problem one (something where your Java isn't working), please give us more information about your setup - command line, notebook, distro, etc? Likely you really don't have an X11 "Xwindows" display going on.Wed, 05 Oct 2016 13:04:10 +0200https://ask.sagemath.org/question/35071/plot-error-no-x11-display-variable-was-set/?comment=35075#post-id-35075Answer by tmonteil for <p>Hi, I have to make a plot of the following formula</p>
<pre><code>x,y=var('x, y')
plot3d((x^2)*y-x*y+x*y^3,0,5)
</code></pre>
<p>but I obtain error message </p>
<blockquote>
<p>/usr/lib64/python2.7/site-packages/sage/plot/plot3d/parametric_plot3d.py\
:704: DeprecationWarning: Unnamed
ranges for more than one variable is
deprecated and will be removed from a
future release of Sage; you can used
named ranges instead, like (x,0,2) See
<a href="http://trac.sagemath.org/7008">http://trac.sagemath.org/7008</a> for
details. g, ranges =
setup_for_eval_on_grid(f,
[urange,vrange], plot_points)
Exception in thread "main"
java.lang.ExceptionInInitializerError
Caused by: java.awt.HeadlessException:
No X11 DISPLAY variable was set, but
this program performed an operation
which requires it. at
sun.awt.HeadlessToolkit.getScreenSize(HeadlessToolkit.java:284)
at
org.openscience.jmol.app.jmolpanel.JmolPanel.<clinit>(JmolPanel.ja\
va:173)
/usr/lib64/python2.7/site-packages/sage/repl/rich_output/display_manager\
.py:570: RichReprWarning: Exception in
_rich_repr_ while displaying object: Jmol failed to create file
'/home/sage/.sage/temp/host/1582/dir_0OP2db/preview.png',
see
'/home/sage/.sage/temp/host/1582/tmp_4sBlqC.txt'
for details RichReprWarning,
Graphics3d Object</clinit></p>
</blockquote>
https://ask.sagemath.org/question/35071/plot-error-no-x11-display-variable-was-set/?answer=35072#post-id-35072As the deprecation warning says, you have to use names ranges like `(x,0,2)` to say that `x` belongs to the interval `[0,2]`, and the same for `y`. The following works for me:
sage: x,y=var('x, y')
....: plot3d((x^2)*y-x*y+x*y^3,(x,0,5),(y,0,5))
**EDIT** If the problem comes from java, you can run your command from a notebook, a javascript version of jmol will be used.Wed, 05 Oct 2016 10:44:59 +0200https://ask.sagemath.org/question/35071/plot-error-no-x11-display-variable-was-set/?answer=35072#post-id-35072Comment by Caterpillar for <p>As the deprecation warning says, you have to use names ranges like <code>(x,0,2)</code> to say that <code>x</code> belongs to the interval <code>[0,2]</code>, and the same for <code>y</code>. The following works for me:</p>
<pre><code>sage: x,y=var('x, y')
....: plot3d((x^2)*y-x*y+x*y^3,(x,0,5),(y,0,5))
</code></pre>
<p><strong>EDIT</strong> If the problem comes from java, you can run your command from a notebook, a javascript version of jmol will be used.</p>
https://ask.sagemath.org/question/35071/plot-error-no-x11-display-variable-was-set/?comment=35073#post-id-35073It does not work for me.
https://paste.fedoraproject.org/443880/14756595/Wed, 05 Oct 2016 11:24:47 +0200https://ask.sagemath.org/question/35071/plot-error-no-x11-display-variable-was-set/?comment=35073#post-id-35073Comment by Caterpillar for <p>As the deprecation warning says, you have to use names ranges like <code>(x,0,2)</code> to say that <code>x</code> belongs to the interval <code>[0,2]</code>, and the same for <code>y</code>. The following works for me:</p>
<pre><code>sage: x,y=var('x, y')
....: plot3d((x^2)*y-x*y+x*y^3,(x,0,5),(y,0,5))
</code></pre>
<p><strong>EDIT</strong> If the problem comes from java, you can run your command from a notebook, a javascript version of jmol will be used.</p>
https://ask.sagemath.org/question/35071/plot-error-no-x11-display-variable-was-set/?comment=35074#post-id-35074Workaround at third line of code at https://bugzilla.redhat.com/show_bug.cgi?id=1026751#c1Wed, 05 Oct 2016 11:46:49 +0200https://ask.sagemath.org/question/35071/plot-error-no-x11-display-variable-was-set/?comment=35074#post-id-35074