octave-maintainers
[Top][All Lists]
Advanced

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

Re: [changeset] print() options not working


From: Jim H
Subject: Re: [changeset] print() options not working
Date: Wed, 28 Jan 2009 14:59:33 -0800 (PST)

print() works for me in octave 3.0.3 and gnuplot 4.2.2.  But there is a
caveat:

* With my gnuplot, I have to give the file type in uppercase:  '-dPDF',
otherwise gnuplot complains that the terminal type is unknown.  If this is
also true for others users, then perhaps the keepers of the manual updates
can make a mental note to mention this in later editions.  Confusingly, "set
terminal" in gnuplot shows all terminals in lowercase and does not include
jpeg, pdf, etc. but the gnuplot command generated by octave "set terminal
XXXX..." does work.  So there is something odd about the online gnuplot
help.

-Jim


John W. Eaton-3 wrote:
> 
> On 27-Jan-2009, John W. Eaton wrote:
> 
> | On  3-Jan-2009, Ben Abbott wrote:
> | 
> | | 
> | | 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.
> | 
> | What happened to the patch?  The attachment I received only included
> | this shell script:
> | 
> |   #!/usr/bin/env bash
> |   export OCTAVE_ARCHIVE=~/Development/mercurial/octave
> |   octave_changeset -u "Daniel Sebald <address@hidden>" -d
> "gnuplot_drawnow.m: Bug fix for print options" -o
> "changeset-gnuplot_drawnow2.patch" gnuplot_drawnow.m
> |   mate "changeset-gnuplot_drawnow2.patch"
> 
> Never mind, I see now that this change has apparently been made.
> 
> jwe
> 
> 

-- 
View this message in context: 
http://www.nabble.com/print%28%29-options-not-working-tp21262518p21717119.html
Sent from the Octave - Maintainers mailing list archive at Nabble.com.



reply via email to

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