"errors" when running plot

Ben Abbott bpabbott at mac.com
Wed Jun 10 12:08:27 CDT 2009


On Wednesday, June 10, 2009, at 12:29PM, "ws" <webb.sprague at gmail.com> wrote:
>> I assume you're just wanting to suppress output to a window? If not, can you 
>describe what behavior it is you desire?
>> 
>> If you'd like to suppress displayed output, you can begin our Octave session 
>with
>> 
>>     set (0, "defaultfigurevisible", "off")
>> 
>> That will suppress output to a window, but the print command will still work.
>
>Thanks Ben -- I am almost there.  I made the following changes to 
>octavehome/share/octave/site/m/startup/octaverc, and plotting works great:
>
>putenv('DISPLAY', '')
>putenv('GNUTERM', 'png')
>gnuplot_binary ('/home/wsprague/gnuplot-4.2.5/bin/gnuplot')
>set (0, "defaultfigurevisible", "off")
>
>However, I am still getting "warning: X11 DISPLAY environment variable not set" 
>errors when I start up.  Since I am running completely "X-less" (graphing 
>highway vehicle traffic using a cron job), I would like to make this go away -- 
>if nothing else, for the sake of good craftsmanship.
>
>Thanks to Ben and all Octave users and developers!
>

Try using

putenv ("GNUTERM", "windows")

But don't set this to a bitmap (such as png), as that will only work when an output file is provided (i.e. when printing).

I do not know why you get the x11 error. Do you get it when you run gnuplot direclty and enter the commands below?

set term png
set output test.png
plot sin(x)
exit

Ben




More information about the Help-octave mailing list