[changeset] print() options not working

Ben Abbott bpabbott at mac.com
Sat Jan 3 07:31:55 CST 2009


On Jan 3, 2009, at 1:34 AM, Ben Abbott wrote:

>
> On Jan 3, 2009, at 1:21 AM, Daniel J Sebald wrote:
>
>> I've noticed that the options for print() are not working  
>> correctly.  Attached is a short patch with a fix.  Here are a  
>> couple lines to illustrate the problem:
>>
>> function [ enhanced ] = gnuplot_set_term (plot_stream, h, term, file)
>> ...
>>     if (nargin > 4 && ischar (opts_str))
>>       ## Options must go last
>>       term_str = sprintf ("%s %s", term_str, opts_str);
>>
>> I believe it should be > 2, not > 4.  term_str is derived from term.
>>
>> Here is some code to try as before/after:
>>
>> x = [0:0.01:1]';
>> Y = [x sin(x) cos(x)];
>> plot(x,Y)
>> legend('x', 'sin(x)', 'cos(x)')
>> print('-deps', '-solid', 'test.eps')
>>
>> Dan
>>
>
> Dan, I've been working in this area quite a bit over the last  
> several weeks. Perhaps this bug is my doing?
>
> In any event, I can take a look tomorrow.
>
> Ben

I've attached a changeset attributed to you. I also fixed a few  
function definitions that included brackets that are not consistent  
with Octave's coding standard.

Ben

-------------- next part --------------
A non-text attachment was scrubbed...
Name: changeset-gnuplot_drawnow.sh
Type: application/octet-stream
Size: 281 bytes
Desc: not available
Url : https://www-old.cae.wisc.edu/pipermail/octave-maintainers/attachments/20090103/8cbfb3d0/attachment.obj 
-------------- next part --------------



More information about the Octave-maintainers mailing list