help-octave
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Problems with gnuplot and jpg output


From: Ben Abbott
Subject: Re: Problems with gnuplot and jpg output
Date: Fri, 05 Jun 2009 20:38:15 -0400


On Jun 5, 2009, at 3:57 PM, Webb Sprague wrote:

Hello,
look at the help for octave's "print" command and select the output (to file - "look for "-dDEVICE" parameter) that fits your needs. You can generate many types of files, e.g. EPS, PNG, JPEG ... all of them are included.

Problem is you can't run this before the plot command, which is where
the errors come from.  (I actually know matlab/ octave pretty well --
at least I have plotted and then printed many times....)

So I hope this helps.

Well, I am getting closer ... thanks!

I don't know why you're getting gnuplot errors when using x11 ... unless your gnuplot doesn't recognize x11. Please run gnuplot, type "show var GPVAL_TERMINALS", and let us know what terminals are listed. Once we see what terminals your gnuplot supports you'll need to create the environment variable "GNUTERM" and set it equal to the terminal name that displays correctly for you.

As I'm not a windows user, but looking at octave's source it looks like you need to have "GNUTERM=windows". If my inference is correct, when you run octave you can do that by

        setenv ("GNUTERM", "windows")

Regarding plot/print ... you do need to issue a plot command prior to printing, but you've already done that (you got gnuplot errors, but the command was given and octave created the graphics objects). You can suppress the warnings by turning off the figure's visibility.

        figure (1, "visible", "off")
        plot (1:10)
        priint -dpng test.png

However, if the setenv command above works, you shouldn't have to resort to such tricks.

Ben


reply via email to

[Prev in Thread] Current Thread [Next in Thread]