help-octave
[Top][All Lists]
Advanced

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

Re: Printing a plot...


From: Ben Abbott
Subject: Re: Printing a plot...
Date: Tue, 16 Jul 2013 08:17:41 -0400

On Jul 16, 2013, at 1:16 AM, Tatsuro MATSUOKA wrote:

> --- On Tue, 2013/7/16, martine1212  wrote:
> 
>> According to the help menu...
>> 
>> — Function File: print ()
>> — Function File: print (options)
>> — Function File: print (filename, options)
>> — Function File: print (h, filename, options)
>> 
>> Using the last one in my program
>> 
>> print(H1, 'dummy.pdf',  -landscape);
>> 
>> print (h1, 'dummy.pdf', -landscape)
>> ?? error?? landscape
>> error: `landscape' undefined near line 69 column 26
>> error: evaluating argument list element number 3        
>> 
>> ok try putting '-landscape'
>> 
>> print (h1, 'dummy.pdf', '-landscape')
>> error: strtrim: S argument must be a string or cellstring
>> error: called from:
>> error:   /usr/share/octave/3.6.3/m/strings/strtrim.m at line 71, column 5
>> error:   /usr/share/octave/3.6.3/m/plot/private/__print_parse_opts__.m at
>> line 78, column 9
>> error:   /usr/share/octave/3.6.3/m/plot/print.m at line 260, column 8 
>> 
>> ok, how does it work??
>> 
>> This works (but it does not follow the published format)
>> 
>> print -landscape dummy.pdf
>> 
>> but how do I tell to print h1
>> 
> 
> The below worked for me (octave 3.6.4 MSVC)
> 
> figure(2);
> fplot ("sin", [0, 2*pi]);
> print(2, 'dummy.pdf',  '-landscape');
> 

Tatsuro's example works for me with gnuplot, but with fltk the right edge of 
the plot is clipped and is not centered.  I recall this being fixed in the 
developer's sources.

        graphics_toolkit gnuplot
        hf = figure();
        fplot ("sin", [0, 2*pi]);
        print(hf, 'dummy.pdf',  '-landscape');

Ben




reply via email to

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