|
From: V. <gae...@no...> - 2005-06-22 17:47:58
|
Replot in epslatex terminal acts exactly like in postscript terminal
: it creates a new page of the epsfile. But this page never gets
displayed by latex. Wouldn't it be a more consistent option to have
"replot" act like in the x11, or the png terminal ?
Ga=EBl
|
|
From:
<br...@ph...> - 2005-06-23 20:25:12
|
Gaël Varoquaux wrote: > Replot in epslatex terminal acts exactly like in postscript terminal > : it creates a new page of the epsfile. It must not do that. EPS files by their very definition cannot have multiple pages. > But this page never gets > displayed by latex. It shouldn't --- it's not allowed to be there. > Wouldn't it be a more consistent option to have > "replot" act like in the x11, or the png terminal ? It cannot act like the X11 terminal. It has to act like (I hope) png does: ignore all further plot commands after the first one until the output is closed and (another one) re-opened. |
|
From: Daniel J S. <dan...@ie...> - 2005-06-23 20:49:56
|
Hans-Bernhard Br=F6ker wrote: > Ga=EBl Varoquaux wrote: >=20 >> Replot in epslatex terminal acts exactly like in postscript termin= al >> : it creates a new page of the epsfile.=20 >=20 >=20 > It must not do that. EPS files by their very definition cannot > have multiple pages. >=20 > > But this page never gets >=20 >> displayed by latex.=20 >=20 >=20 > It shouldn't --- it's not allowed to be there. >=20 > > Wouldn't it be a more consistent option to have >=20 >> "replot" act like in the x11, or the png terminal ? >=20 >=20 > It cannot act like the X11 terminal. It has to act like (I hope) png=20 > does: ignore all further plot commands after the first one until the=20 > output is closed and (another one) re-opened. How about keep overwriting the old one? That way, if a person makes a mi= stake,=20 s/he can retype the command without having go through the "set output; se= t term=20 ...; set output ..." sequence again. Dan |
|
From:
<br...@ph...> - 2005-06-23 21:28:40
|
Daniel J Sebald wrote: > How about keep overwriting the old one? That way, if a person makes a > mistake, s/he can retype the command without having go through the "set > output; set term ...; set output ..." sequence again. I would tend to value internal consistency with other drivers more important than that --- the PNG/GD driver family established "typical" gnuplot behaviour, which any new drivers faced with the same problem should follow. I'm a little surprised that "postscript eps" mode doesn't behave properly either --- it manages to avoid actually outputting %%Page DSCs, but still allows multiple /showpage instances in the same file. I suspect that's a direct violation of the EPSF file definition. I.e. the problem is bigger then it originally appeared. |
|
From: Daniel J S. <dan...@ie...> - 2005-06-23 21:37:27
|
Hans-Bernhard Br=F6ker wrote: > I'm a little surprised that "postscript eps" mode doesn't behave=20 > properly either --- it manages to avoid actually outputting %%Page DSCs= ,=20 > but still allows multiple /showpage instances in the same file. I=20 > suspect that's a direct violation of the EPSF file definition. Probably is. But most drivers probably handle such a case in a fairly gr= aceful=20 way because it isn't too difficult to deal with. Dan |
|
From: Ethan M. <merritt@u.washington.edu> - 2005-06-24 00:05:28
|
On Thursday 23 June 2005 01:52 pm, Daniel J Sebald wrote: > Hans-Bernhard Br=F6ker wrote: > >=20 > > It cannot act like the X11 terminal. It has to act like (I hope) png=20 > > does: ignore all further plot commands after the first one until the=20 > > output is closed and (another one) re-opened. The png terminal does not act that way, nor should it. My normal mode of generating and viewing png output is set term png set output '| display png;-' Then I can view the output from successive plot commands interactively by hitting <space> in the display window. If I want to save a particular one to disk, then I hit "save" instead. > How about keep overwriting the old one? That way, if a person makes a mi= stake,=20 > s/he can retype the command without having go through the "set output; se= t term=20 > ...; set output ..." sequence again. Maybe. I would like to use eps and gv through a pipe=20 set output '| gv -' similarly to the way I use png+display, but unfortunately gv is not happy with that. So a compromise would indeed be to continually=20 overwrite the same output file, and view successive images in gv by hitting the re-read button. But I don't immediately see how I would keep the two ends of the process in sync as easily as the png+display case. =2D-=20 Ethan A Merritt merritt@u.washington.edu Biomolecular Structure Center Mailstop 357742 University of Washington, Seattle, WA 98195 |
|
From: James R. V. Z. <jr...@co...> - 2005-07-03 16:31:08
|
Ethan Merritt <merritt@u.washington.edu> wrote: >My normal mode of generating and viewing png output is > set term png > set output '| display png;-' > >Then I can view the output from successive plot commands interactively >by hitting <space> in the display window. If I want to save a particular >one to disk, then I hit "save" instead. Nice! Also non-obvious, I think, so I've checked in the documentation change below. Piping to display works for some formats other than PNG and GIF, but I didn't find any others where <space> shows the next plot. - Jim Van Zandt Index: gd.trm =================================================================== RCS file: /cvsroot/gnuplot/gnuplot/term/gd.trm,v retrieving revision 1.71 diff -r1.71 gd.trm 1919a1920,1928 > " PNG plots may be conveniently viewed by piping the output to the", > " 'display' program from the ImageMagick package as follows:", > " set term png", > " set output '| display png:-'", > "", > " View the output from successive plot commands interactively by hitting", > " <space> in the display window. To save a particular one to disk, left", > " click in the display window and choose `save`.", > "", 2243a2253,2261 > " GIF plots may be conveniently viewed by piping the output to the", > " 'display' program from the ImageMagick package as follows:", > " set term gif", > " set output '| display gif:-'", > "", > " View the output from successive plot commands interactively by hitting", > " <space> in the display window. To save a particular one to disk, left", > " click in the display window and choose `save`.", > "", |
|
From: V. <gae...@no...> - 2005-06-23 20:56:28
|
On Thu, Jun 23, 2005 at 10:27:48PM +0200, Hans-Bernhard Br=F6ker wrote:
> It cannot act like the X11 terminal. It has to act like (I hope) png=20
> does: ignore all further plot commands after the first one until the=20
> output is closed and (another one) re-opened.
It doesn't seem to. I just tried, giving gnuplot two plot commands,
and when I open the file with gv I can select from the menu "page" the
entry "next", and switch from my first plot to my second.
--
Ga=EBl
|
|
From:
<br...@ph...> - 2005-06-23 21:15:22
|
Gaël Varoquaux wrote: > It doesn't seem to. I just tried, giving gnuplot two plot commands, > and when I open the file with gv I can select from the menu "page" the > entry "next", and switch from my first plot to my second. That's a bug then, which needs to be fixed. Off-hand I'd guess it to have been introduced when the pslatex and epslatex stuff was merged. |
|
From: Ethan M. <merritt@u.washington.edu> - 2005-06-24 00:22:15
|
On Thursday 23 June 2005 02:18 pm, Hans-Bernhard Br=F6ker wrote: > Ga=EBl Varoquaux wrote: >=20 > > It doesn't seem to. I just tried, giving gnuplot two plot commands, > > and when I open the file with gv I can select from the menu "page" the > > entry "next", and switch from my first plot to my second. >=20 > That's a bug then, which needs to be fixed. Off-hand I'd guess it to=20 > have been introduced when the pslatex and epslatex stuff was merged. So far as I know, it has always behaved that way. Certainly 4.0 did (I just confirmed this). I consider it a feature, not a bug.=20 You are free to save each plot to a new file if you like. But you also have the option of saving a sequence of plots to a single file. Later you can edit the individual plots in a tool like Illustrator, and save the ones you want to individual *.eps files for inclusion in a document. =20 =2D-=20 Ethan A Merritt merritt@u.washington.edu Biomolecular Structure Center Mailstop 357742 University of Washington, Seattle, WA 98195 |
|
From: V. <gae...@no...> - 2005-06-24 07:29:50
|
On Thu, Jun 23, 2005 at 05:22:08PM -0700, Ethan Merritt wrote:
> I consider it a feature, not a bug.
Well I think that for the epslatex terminal it is a bug : what's
printed by the replot command never gets shown. And for the eps terminal
it is a very counter-intuitive feature that will trick many users. I
think this beahve should at least be controled by a terminal option and
turned off by default.
--
Ga=EBl
|
|
From:
<br...@ph...> - 2005-06-24 15:43:51
|
Ethan Merritt wrote: > On Thursday 23 June 2005 02:18 pm, Hans-Bernhard Bröker wrote: >>Gaël Varoquaux wrote: >>> It doesn't seem to. I just tried, giving gnuplot two plot commands, >>>and when I open the file with gv I can select from the menu "page" the >>>entry "next", and switch from my first plot to my second. > So far as I know, it has always behaved that way. Certainly 4.0 did > (I just confirmed this). I consider it a feature, not a bug. It may be a (dubious) feature in "postscript eps", but in epslatex, it cannot be anything else but a bug to behave like that. > you can edit the individual plots in a tool like Illustrator, I'm quite sure Illustrator can't figure out epslatex output. |
|
From: Ethan M. <merritt@u.washington.edu> - 2005-06-24 00:14:33
|
On Thursday 23 June 2005 02:31 pm, Hans-Bernhard Br=F6ker wrote:
>=20
> I'm a little surprised that "postscript eps" mode doesn't behave=20
> properly either --- it manages to avoid actually outputting %%Page DSCs,=
=20
> but still allows multiple /showpage instances in the same file. I=20
> suspect that's a direct violation of the EPSF file definition.
The PostScript standard says:
The showpage operator is permitted in EPS files because it is present
in so many PostScript language files [...] The application importing
the EPS file is responsible for redefining showpage [...] according
to the following code segment: /showpage {} def
As a result, you can have as many showpages in an EPSF file as you
like, because they are all redefined to null. I don't see any specific
mention of %%Page in connection with EPSF files.
=2D-=20
Ethan A Merritt merritt@u.washington.edu
Biomolecular Structure Center
Mailstop 357742
University of Washington, Seattle, WA 98195
|
|
From: Ethan M. <merritt@u.washington.edu> - 2005-06-24 16:56:51
|
On Friday 24 June 2005 08:44 am, Hans-Bernhard Br=F6ker wrote: > Ethan Merritt wrote: >=20 > > As a result, you can have as many showpages in an EPSF file as you > > like, because they are all redefined to null. I don't see any specific > > mention of %%Page in connection with EPSF files. >=20 > It wouldn't be --- %%Page is not part of the PostScript language proper,= =20 > but rather of the DSC extensions. =20 > That's why it's formatted like a PostScript comment. Thanks for that bit of jargon, since it lets me find the relevant sections of the PostScript spec. The example EPSF files in the PostScript Language Reference Manual do use %%Page operators. It is explicitly allowed, as part of the Document Structure Convention, for EPSF and EPSI files. On Friday 24 June 2005 12:29 am, Ga=EBl Varoquaux wrote: >=20 > Well I think that for the epslatex terminal it is a bug : what's > printed by the replot command never gets shown. It may well be undesirable for the epslatex terminal. I defer to those who actual use this terminal type. =20 > And for the eps terminal=20 > it is a very counter-intuitive feature that will trick many users. I > think this beahve should at least be controled by a terminal option and > turned off by default. But for plain *.eps output generated by 'set term post eps', so far as I understand Adobe's reference documentation, it is allowed. Existing viewers (ghostscript, gv) handle the presence of multiple %%Page elements by displaying one screen per %%Page in an eps file.=20 My current PostScript printer (Xerox Phaser 8400) handles them by printing them all, but without a page-feed in between. So the individual=20 %%BoundingBox lines allow multiple plots per sheet of paper, just as in a full *.ps file. "Counter-intuitive" obviously has different meanings for each person. To me it is intuitive that a *.eps file is the same as a *.ps file except that it allows being embedded in another document. I realize there is also provision for having an embedded preview image bitmap in the *.eps case, but I rarely encounter these. I imagine this was an accommodation to the historically limited support for displaying the actual PostScript contents under MS Windows.=20 Anyhow, I would argue against changing the current (and long-standing) default behavior of 'set term post eps'. For epslatex, I have no opinion one way or the other. =2D-=20 Ethan A Merritt merritt@u.washington.edu Biomolecular Structure Center Mailstop 357742 University of Washington, Seattle, WA 98195 |
|
From: V. <gae...@no...> - 2005-06-24 17:02:22
|
On Fri, Jun 24, 2005 at 09:56:43AM -0700, Ethan Merritt wrote:
> "Counter-intuitive" obviously has different meanings for each person.
Sure, then lets make this behaviour obvious by stressing it in the
help of the postscript terminal. As for the epslatex terminal, I really
think it should be turned off : it took me a while to understand what
was happening when I discovered this and I am sure many users would just
have given up.
Ga=EBl
|
|
From: Ethan M. <merritt@u.washington.edu> - 2005-06-24 17:20:03
|
On Friday 24 June 2005 10:02 am, Ga=EBl Varoquaux wrote:
> On Fri, Jun 24, 2005 at 09:56:43AM -0700, Ethan Merritt wrote:
> > "Counter-intuitive" obviously has different meanings for each person.
>=20
> Sure, then lets make this behaviour obvious by stressing it in the
> help of the postscript terminal.=20
I am reminded of a request that went by on either the newsgroup or
the mailing list a while ago. Re-casting it in the light of the=20
current discussion, it would be to create a new variant of 'set output'
that specifies a function to generate a filename, rather than the
filename itself.
FILENAME(plotno) =3D sprintf("./plot_%02d.eps",plotno)
set output sequential FILENAME
Each plot command would increment plotno and trigger the creation of a
new output file.
No, I don't have a full implementation in my head. I'm not sure=20
what difficulties might crop up. But it would provide a
terminal-independent solution to the current problem.
=20
=2D-=20
Ethan A Merritt merritt@u.washington.edu
Biomolecular Structure Center
Mailstop 357742
University of Washington, Seattle, WA 98195
|
|
From: Petr M. <mi...@ph...> - 2005-06-24 17:51:53
|
> FILENAME(plotno) = sprintf("./plot_%02d.eps",plotno)
> set output sequential FILENAME
>
> Each plot command would increment plotno and trigger the creation of a
> new output file.
New gnuplot global variables PLOT_NUMBER and PAGE_NUMBER?
---
PM
|
|
From: Ethan M. <merritt@u.washington.edu> - 2005-06-24 18:02:56
|
On Friday 24 June 2005 10:51 am, Petr Mikulik wrote:
> > FILENAME(plotno) = sprintf("./plot_%02d.eps",plotno)
> > set output sequential FILENAME
> >
> > Each plot command would increment plotno and trigger the creation of a
> > new output file.
>
> New gnuplot global variables PLOT_NUMBER and PAGE_NUMBER?
You mean, so that you can at any time reset the sequence, or force the
next plot to have a particular number?
Sure. That could be part of it, if you like.
--
Ethan A Merritt merritt@u.washington.edu
Biomolecular Structure Center
Mailstop 357742
University of Washington, Seattle, WA 98195
|
|
From: Petr M. <mi...@ph...> - 2005-06-24 18:26:01
|
>> New gnuplot global variables PLOT_NUMBER and PAGE_NUMBER? > > You mean, so that you can at any time reset the sequence, or force the > next plot to have a particular number? > Sure. That could be part of it, if you like. Those variables would be incremented by gnuplot at each "plot" or multiplot+plot, respectively. --- PM |
|
From: Ethan M. <merritt@u.washington.edu> - 2005-06-24 18:35:37
|
On Friday 24 June 2005 11:25 am, Petr Mikulik wrote: > >> New gnuplot global variables PLOT_NUMBER and PAGE_NUMBER? > > > > You mean, so that you can at any time reset the sequence, or force the > > next plot to have a particular number? > > Sure. That could be part of it, if you like. > > Those variables would be incremented by gnuplot at each "plot" or > multiplot+plot, respectively. Yes, of course. I understood that. But I though your point was that making them visible to the user allows you to change them explicitly. For instance, if you were to make a mistake while creating a sequence of plots interactively you could do PLOT_NUMBER = PLOT_NUMBER -1 before fixing the error and replotting. This would overwrite the erroneous file containing the erroneous file and then continue on in the same sequence as before. -- Ethan A Merritt merritt@u.washington.edu Biomolecular Structure Center Mailstop 357742 University of Washington, Seattle, WA 98195 |
|
From: Petr M. <mi...@ph...> - 2005-06-24 20:41:15
|
> Yes, of course. I understood that. But I though your point was that > making them visible to the user allows you to change them explicitly. > erroneous file containing the erroneous file and then continue on > in the same sequence as before. Yes. --- PM |