help-octave
[Top][All Lists]
Advanced

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

Re: saving plotted graph to a file.


From: Ben Abbott
Subject: Re: saving plotted graph to a file.
Date: Tue, 14 May 2013 22:02:41 +0800

On May 14, 2013, at 9:52 PM, Damian Harty wrote:

>>> I'm having a similar issue, but the strange thing is that it only started 
>>> early this afternoon.
>>> 
>>> Octave 3.6.4, Windows 7.
>>> 
> 
>> Does a simple plot work?
> 
>>      close all
>>      figure (1)
>>      plot (rand (3))
>>      print test.jpg
> 
>> If it does, can you give a simple example that fails so that others can 
>> duplicate the problem?
> 
> The simple plots work fine. In fact as I dig into things it is only one 
> particular plot that fails. It turns out it fails because I don't force a 
> filename on it (I had thought it would inherit something, my error). With no 
> filename and no explicit destination, it goes down some kind of default route 
> that fails - hence a load of error messages.
> 
> I think this is a known issue that being specific about the destination file 
> (& hence format) works around without any difficulty.
> 
> Time difference between gnuplot and fltk is profound - about a second versus 
> multiple minutes when the dataset approaches 10,000 points to write the 
> output file.
> 
> Damian

The fltk version is slower?  Can you provide a simple example?

I did a quick test below using 10k points.  Gnuplot is faster for both on 
screen rendering and for printing.

graphics_toolkit gnuplot
figure
tic ; plot (rand (100)) ; toc
Elapsed time is 1.4476 seconds.
tic ; print gnuplot.png ; toc
Elapsed time is 5.43447 seconds.

graphics_toolkit fltk
figure
tic ; plot (rand (100)) ; toc
Elapsed time is 0.842077 seconds.
tic ; print fltk.png ; toc
Elapsed time is 1.91729 seconds.

Ben




reply via email to

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