Ask Your Question

plot error: No X11 DISPLAY variable was set

asked 2016-10-05 10:24:03 +0200

Caterpillar gravatar image

updated 2016-10-05 10:43:03 +0200

Hi, I have to make a plot of the following formula

x,y=var('x, y')

but I obtain error message

/usr/lib64/python2.7/site-packages/sage/plot/plot3d/\ :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 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( at<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>

edit retag flag offensive close merge delete


Given 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.

kcrisman gravatar imagekcrisman ( 2016-10-05 13:04:10 +0200 )edit

1 Answer

Sort by ยป oldest newest most voted

answered 2016-10-05 10:44:59 +0200

tmonteil gravatar image

updated 2016-10-05 22:37:00 +0200

As 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.

edit flag offensive delete link more


Caterpillar gravatar imageCaterpillar ( 2016-10-05 11:24:47 +0200 )edit

Workaround at third line of code at

Caterpillar gravatar imageCaterpillar ( 2016-10-05 11:46:49 +0200 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower


Asked: 2016-10-05 10:24:03 +0200

Seen: 721 times

Last updated: Oct 05 '16