You can subscribe to this list here.
2001 |
Jan
|
Feb
(1) |
Mar
|
Apr
|
May
|
Jun
|
Jul
(1) |
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
---|---|---|---|---|---|---|---|---|---|---|---|---|
2002 |
Jan
(1) |
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
(1) |
Aug
(1) |
Sep
|
Oct
|
Nov
(1) |
Dec
|
2003 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
(1) |
Aug
(1) |
Sep
|
Oct
(83) |
Nov
(57) |
Dec
(111) |
2004 |
Jan
(38) |
Feb
(121) |
Mar
(107) |
Apr
(241) |
May
(102) |
Jun
(190) |
Jul
(239) |
Aug
(158) |
Sep
(184) |
Oct
(193) |
Nov
(47) |
Dec
(68) |
2005 |
Jan
(190) |
Feb
(105) |
Mar
(99) |
Apr
(65) |
May
(92) |
Jun
(250) |
Jul
(197) |
Aug
(128) |
Sep
(101) |
Oct
(183) |
Nov
(186) |
Dec
(42) |
2006 |
Jan
(102) |
Feb
(122) |
Mar
(154) |
Apr
(196) |
May
(181) |
Jun
(281) |
Jul
(310) |
Aug
(198) |
Sep
(145) |
Oct
(188) |
Nov
(134) |
Dec
(90) |
2007 |
Jan
(134) |
Feb
(181) |
Mar
(157) |
Apr
(57) |
May
(81) |
Jun
(204) |
Jul
(60) |
Aug
(37) |
Sep
(17) |
Oct
(90) |
Nov
(122) |
Dec
(72) |
2008 |
Jan
(130) |
Feb
(108) |
Mar
(160) |
Apr
(38) |
May
(83) |
Jun
(42) |
Jul
(75) |
Aug
(16) |
Sep
(71) |
Oct
(57) |
Nov
(59) |
Dec
(152) |
2009 |
Jan
(73) |
Feb
(213) |
Mar
(67) |
Apr
(40) |
May
(46) |
Jun
(82) |
Jul
(73) |
Aug
(57) |
Sep
(108) |
Oct
(36) |
Nov
(153) |
Dec
(77) |
2010 |
Jan
(42) |
Feb
(171) |
Mar
(150) |
Apr
(6) |
May
(22) |
Jun
(34) |
Jul
(31) |
Aug
(38) |
Sep
(32) |
Oct
(59) |
Nov
(13) |
Dec
(62) |
2011 |
Jan
(114) |
Feb
(139) |
Mar
(126) |
Apr
(51) |
May
(53) |
Jun
(29) |
Jul
(41) |
Aug
(29) |
Sep
(35) |
Oct
(87) |
Nov
(42) |
Dec
(20) |
2012 |
Jan
(111) |
Feb
(66) |
Mar
(35) |
Apr
(59) |
May
(71) |
Jun
(32) |
Jul
(11) |
Aug
(48) |
Sep
(60) |
Oct
(87) |
Nov
(16) |
Dec
(38) |
2013 |
Jan
(5) |
Feb
(19) |
Mar
(41) |
Apr
(47) |
May
(14) |
Jun
(32) |
Jul
(18) |
Aug
(68) |
Sep
(9) |
Oct
(42) |
Nov
(12) |
Dec
(10) |
2014 |
Jan
(14) |
Feb
(139) |
Mar
(137) |
Apr
(66) |
May
(72) |
Jun
(142) |
Jul
(70) |
Aug
(31) |
Sep
(39) |
Oct
(98) |
Nov
(133) |
Dec
(44) |
2015 |
Jan
(70) |
Feb
(27) |
Mar
(36) |
Apr
(11) |
May
(15) |
Jun
(70) |
Jul
(30) |
Aug
(63) |
Sep
(18) |
Oct
(15) |
Nov
(42) |
Dec
(29) |
2016 |
Jan
(37) |
Feb
(48) |
Mar
(59) |
Apr
(28) |
May
(30) |
Jun
(43) |
Jul
(47) |
Aug
(14) |
Sep
(21) |
Oct
(26) |
Nov
(10) |
Dec
(2) |
2017 |
Jan
(26) |
Feb
(27) |
Mar
(44) |
Apr
(11) |
May
(32) |
Jun
(28) |
Jul
(75) |
Aug
(45) |
Sep
(35) |
Oct
(285) |
Nov
(99) |
Dec
(16) |
2018 |
Jan
(8) |
Feb
(8) |
Mar
(42) |
Apr
(35) |
May
(23) |
Jun
(12) |
Jul
(16) |
Aug
(11) |
Sep
(8) |
Oct
(16) |
Nov
(5) |
Dec
(8) |
2019 |
Jan
(9) |
Feb
(28) |
Mar
(4) |
Apr
(10) |
May
(7) |
Jun
(4) |
Jul
(4) |
Aug
|
Sep
(4) |
Oct
|
Nov
(23) |
Dec
(3) |
2020 |
Jan
(19) |
Feb
(3) |
Mar
(22) |
Apr
(17) |
May
(10) |
Jun
(69) |
Jul
(18) |
Aug
(23) |
Sep
(25) |
Oct
(11) |
Nov
(20) |
Dec
(9) |
2021 |
Jan
(1) |
Feb
(7) |
Mar
(9) |
Apr
|
May
(1) |
Jun
(8) |
Jul
(6) |
Aug
(8) |
Sep
(7) |
Oct
|
Nov
(2) |
Dec
(23) |
2022 |
Jan
(23) |
Feb
(9) |
Mar
(9) |
Apr
|
May
(8) |
Jun
(1) |
Jul
(6) |
Aug
(8) |
Sep
(30) |
Oct
(5) |
Nov
(4) |
Dec
(6) |
2023 |
Jan
(2) |
Feb
(5) |
Mar
(7) |
Apr
(3) |
May
(8) |
Jun
(45) |
Jul
(8) |
Aug
|
Sep
(2) |
Oct
(14) |
Nov
(7) |
Dec
(2) |
2024 |
Jan
(4) |
Feb
(4) |
Mar
|
Apr
(7) |
May
(2) |
Jun
(1) |
Jul
|
Aug
(5) |
Sep
|
Oct
|
Nov
(4) |
Dec
(14) |
2025 |
Jan
(22) |
Feb
(6) |
Mar
(5) |
Apr
(14) |
May
(6) |
Jun
(11) |
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
From: Daniel J S. <dan...@ie...> - 2003-12-05 18:58:51
|
Did anyone have any ideas for getting the width of a line in terms of plot units from the terminal? Dan |
From: Daniel J S. <dan...@ie...> - 2003-12-05 18:52:41
|
Hans-Bernhard Broeker wrote: >If gnuplot is being used interactively, I would think raising windows on >user request is a task well outside gnuplot's domain --- that's what you >have a GUI with a window manager for. > Oh, and yes it is the job of the GUI panel, dock, or whatever to be well organized. To me, that is the fastest way to find and raise a window. I point out that having this control in Gnuplot is of some use in cases where there is an application utilizing Gnuplot through a pipe. Say I write a GUI-based app for processing and managing images, waveforms, or what have you. If my app has some kind of menu where I can select files or whatnot, one of the functions may be to bring that waveform to the front of the screen, enlarge the window, close the window, etc. Dan -- Dan Sebald email: daniel . sebald @ ie ee . o rg URL: ht tp://acer-access.c om/~dsebald @ acer-access.c om/ |
From: Daniel J S. <dan...@ie...> - 2003-12-05 18:24:27
|
Hans-Bernhard Broeker wrote: >On Thu, 4 Dec 2003, Petr Mikulik wrote: > > > >>Often I need to raise terminal windows (or multiple windows in X11) >>covered by other windows on the desktop (editor, console, ...), for >>which I had to do "replot" -- but that doesn't work with inline data, >>with multiple open gnuplot_x11 windows etc. >> >> > >I don't see how it can be a good idea to have a gnuplot-internal command >to raise a graph window to the front. > >If gnuplot is being used interactively, I would think raising windows on >user request is a task well outside gnuplot's domain --- that's what you >have a GUI with a window manager for. > >If gnuplot is non-interactive (scripted or redirected), I don't think the >script has any business actively raising windows except when they're first >created or the plot actually changed. Not unless gnuplot is the only >program displaying visible windows at a given time. And maybe not even >then. There must have been a reason X11 has option -noraise to avoid >that, right? > I sort of agree with Hans on this one, and the reason is because of the Gnuplot paradigm which seems to be that plot commands get sent to terminals in a unidirectional way. There was discussion on the list about making the plots in Gnuplot internally more object oriented so that old plots could be replotted without having to reissue all the necessary commands. If that were to become the new paradigm then I would say that having a dedicated "raise" command might fit, but as it stands probably not. That doesn't mean a convenient "raise" isn't a good idea, because it is, and it's something I would find useful. I would say such a thing really should be part of the "set term", if anywhere, if the behavior can be tweeked such that "set term x11 44 raise" would raise the window. I realize the option doesn't actually raise the window immediately, only upon plotting... and I guess these are mutually exclusive things, i.e., that one might want to just raise the window now to be able to see it and not necessarily to keep raising to the front upon plot in the future. Could a solution be to add several more options that control the window? Instead of just "close" how about {close | front | back | minimize | maximize | fullscreen} But again, the idea of how to handle the effect of these on the current plot hangs out there. I would say that these should _not_ change the current plot number, but I realize that that is potentially confusing as it seems to violate the current documentation a bit. Dan |
From: Hans-Bernhard B. <br...@ph...> - 2003-12-05 13:26:49
|
On Thu, 4 Dec 2003, Petr Mikulik wrote: > Often I need to raise terminal windows (or multiple windows in X11) > covered by other windows on the desktop (editor, console, ...), for > which I had to do "replot" -- but that doesn't work with inline data, > with multiple open gnuplot_x11 windows etc. I don't see how it can be a good idea to have a gnuplot-internal command to raise a graph window to the front. If gnuplot is being used interactively, I would think raising windows on user request is a task well outside gnuplot's domain --- that's what you have a GUI with a window manager for. If gnuplot is non-interactive (scripted or redirected), I don't think the script has any business actively raising windows except when they're first created or the plot actually changed. Not unless gnuplot is the only program displaying visible windows at a given time. And maybe not even then. There must have been a reason X11 has option -noraise to avoid that, right? -- Hans-Bernhard Broeker (br...@ph...) Even if all the snow were burnt, ashes would remain. |
From: Daniel J S. <dan...@ie...> - 2003-12-04 22:56:52
|
Ethan Merritt wrote: >On Thursday 04 December 2003 13:38, Ethan Merritt wrote: > > >>>will change the current plot to 100. But should >>> set term x11 105 raise >>>actually change the current plot number, or should >>>it just raise that plot (if it exists) and not change the plot? >>> >>> >>The latter, definitely. >> >> > >Oops. I see now that this would specifically contradict >what the current documentation states. Sigh. > If it is a portion of the documentation that has just been added, I think changing the documentation and behavior of "close" for "set term" would be fine. >Maybe we could change the syntax of these new options to > set term x11 {{close|raise} {<x>}} >That is, a terminal number immediately following the >'close' or 'raise' indicates that this command leaves >the current terminal unchanged. While > set term x11 <x> raise >would continue to set the current window to <x> and flag it >to raise again on every new plot, as it does now. > >Seems kind of confusing. Let me try again.... >Petr proposed > 'raise' or 'raise one' >and I protested that it was not necessarily clear which >terminal was involved. How about modifying this to > '{raise|close} term x11 <x>' > >I'm not sure either raise or close belongs in a 'set ...' >command anyhow, since it's a one-time action rather >than a continuing property. > > At first I didn't catch your meaning, but now I think I see what you are saying. By your thinking, then, 'title "plot title"' would stay with the 'set term ...' command because that is still setting a _property_ of the window. "raise" and "close" are basically arranging the desktop and do not constitute a property. They would have no effect on the current plot. (Unless of course the current plot is one that was closed, in which case it goes to the most recently created, if I recall correctly.) That's fine with me so long as others don't feel dedicating an instruction for a rather limited purpose is too much. I'd say then deactivate the "raise" and "close" commands and its documentation if the Gnuplot build is configured such that a windows-based terminal is not compiled into the executable. I.e., #if defined(X11) || defined(OS2) || defined(Windows) close and raise command code #endif Dan |
From: Ethan M. <merritt@u.washington.edu> - 2003-12-04 22:09:20
|
On Thursday 04 December 2003 13:38, Ethan Merritt wrote: > > will change the current plot to 100. But should > >=09 set term x11 105 raise > > actually change the current plot number, or should > > it just raise that plot (if it exists) and not change the plot? > > The latter, definitely. Oops. I see now that this would specifically contradict=20 what the current documentation states. Sigh. Maybe we could change the syntax of these new options to =09set term x11 {{close|raise} {<x>}} That is, a terminal number immediately following the 'close' or 'raise' indicates that this command leaves the current terminal unchanged. While =09set term x11 <x> raise would continue to set the current window to <x> and flag it to raise again on every new plot, as it does now. Seems kind of confusing. Let me try again.... Petr proposed =09'raise' or 'raise one'=20 and I protested that it was not necessarily clear which terminal was involved. How about modifying this to =09'{raise|close} term x11 <x>' I'm not sure either raise or close belongs in a 'set ...' command anyhow, since it's a one-time action rather than a continuing property. > And now that I look, I see that your earlier patch does not > behave this way. But it ought to. > =09set term x11 101 close > should close window 101 but leave the current window > unchanged. Do you want to make that change, or should I? > > > I tend to use the Gnome desktop panel for raising > > the windows. (The problem is if one starts to get too > > many plots open it is difficult to remember in which > > order they came and the plot number never seems > > to appear in the little panel icon because it is "Gnuplot #" > > That sounds like a bug in Gnome. I don't think we should > worry about modifying gnuplot just to correct for poor > window managers. KDE and CDE both show the plot title > correctly in the corresponding window icon. > (Let the flamewars begin :-) --=20 Ethan A Merritt merritt@u.washington.edu Biomolecular Structure Center Box 357742 University of Washington, Seattle, WA 98195 |
From: Ethan M. <merritt@u.washington.edu> - 2003-12-04 21:39:00
|
On Thursday 04 December 2003 13:06, Daniel J Sebald wrote: > I think the "set term ..." approach is better, but there > could be some confusion about it. Typing > > set term x11 100 > > will change the current plot to 100. But should >=09 set term x11 105 raise > actually change the current plot number, or should > it just raise that plot (if it exists) and not change the plot? The latter, definitely. And now that I look, I see that your earlier patch does not behave this way. But it ought to. =09set term x11 101 close should close window 101 but leave the current window unchanged. Do you want to make that change, or should I? > I tend to use the Gnome desktop panel for raising > the windows. (The problem is if one starts to get too > many plots open it is difficult to remember in which > order they came and the plot number never seems > to appear in the little panel icon because it is "Gnuplot #" That sounds like a bug in Gnome. I don't think we should worry about modifying gnuplot just to correct for poor window managers. KDE and CDE both show the plot title correctly in the corresponding window icon. (Let the flamewars begin :-) --=20 Ethan A Merritt merritt@u.washington.edu Biomolecular Structure Center Box 357742 University of Washington, Seattle, WA 98195 |
From: Daniel J S. <dan...@ie...> - 2003-12-04 20:49:57
|
Ethan Merritt wrote: >On Thursday 04 December 2003 10:31, Petr Mikulik wrote: > > > >>Solution: new command "raise" (abbreviated "ra"). Enclosed is an >>implementation for OS/2 PM and Windows terminals. >> >> > >Your patch calls driver-specific routines directly from the core code >in command.c. Doesn't that break all sorts of things? What if your >current terminal type is something other than the windows or OS2 >terminal? > >I would think such a command would have to be implemented either >as a new driver entry point (term->raise)(win_number), or via a new >option to `set term`. > > > >>Could somebody contribute X11 code? >>Note: proposed is "raise one" command for x11, which would raise just >>that one currently "set term"ed window, instead of all windows. >> >> > >Wouldn't it be better to handle this as in Daniel Sebald's recent patch to >communcate with previously opened X windows? > set term x11 <win#> raise >The command is already accepted by the current syntax and parser. >We just need to force an immediate "raise" event if the window already exists. >I'll have a look - it sounds easy enough. > Ethan, Petr added this code to CVS so you should be able to work from there. I think the "set term ..." approach is better, but there could be some confusion about it. Typing set term x11 100 will change the current plot to 100. But should set term x11 105 raise actually change the current plot number, or should it just raise that plot (if it exists) and not change the current plot? The only thing about the "set term ..." approach is that it is slightly long for doing a raise. Raising is one of those commands that is more useful for fluent use of Gnuplot when there are a lot of plots open and you are working away. So it would nice for such a command to be short. I tend to use the Gnome desktop panel for raising the windows. (The problem is if one starts to get too many plots open it is difficult to remember in which order they came and the plot number never seems to appear in the little panel icon because it is "Gnuplot #" and there is never enough room for the number... The most recent version of Gnome may have fixed this. It seems to place all windows launched from the same process under one selectable menu.) Dan |
From: Ethan M. <merritt@u.washington.edu> - 2003-12-04 19:15:49
|
On Thursday 04 December 2003 10:31, Petr Mikulik wrote: > Solution: new command "raise" (abbreviated "ra"). Enclosed is an > implementation for OS/2 PM and Windows terminals. Your patch calls driver-specific routines directly from the core code in command.c. Doesn't that break all sorts of things? What if your current terminal type is something other than the windows or OS2 terminal?=20 I would think such a command would have to be implemented either as a new driver entry point (term->raise)(win_number), or via a new option to `set term`. =20 > Could somebody contribute X11 code? > Note: proposed is "raise one" command for x11, which would raise just > that one currently "set term"ed window, instead of all windows. Wouldn't it be better to handle this as in Daniel Sebald's recent patch t= o communcate with previously opened X windows? =09set term x11 <win#> raise The command is already accepted by the current syntax and parser. We just need to force an immediate "raise" event if the window already ex= ists. I'll have a look - it sounds easy enough. --=20 Ethan A Merritt merritt@u.washington.edu Biomolecular Structure Center Box 357742 University of Washington, Seattle, WA 98195 |
From: Petr M. <mi...@ph...> - 2003-12-04 18:31:45
|
Often I need to raise terminal windows (or multiple windows in X11) covered by other windows on the desktop (editor, console, ...), for which I had to do "replot" -- but that doesn't work with inline data, with multiple open gnuplot_x11 windows etc. Solution: new command "raise" (abbreviated "ra"). Enclosed is an implementation for OS/2 PM and Windows terminals. Could somebody contribute X11 code? Note: proposed is "raise one" command for x11, which would raise just that one currently "set term"ed window, instead of all windows. Well, I hope, you will like it too, so I can committ it afterwards... --- Petr Mikulik |
From: Hans-Bernhard B. <br...@ph...> - 2003-12-02 14:35:39
|
On Mon, 1 Dec 2003, Kelley, Scott wrote: > In order to using scalable png's, What's a "scalable png"? PNG is just as scalable or not as any other pixel-based file format. Which means: hardly at all. > I just installed gnuplot 3.8j onto a Redhat7.2 box. I'm trying to plot > timeseries data. The autofreq's xtics are not behaving right (i.e. like > they did under gnuplot 3.7). I'm afraid "like 3.7 did" is not a particularly precise description of "behaving right". To put it mildly. Timeseries autoticking in 3.7 worked more by lucky happenstance than by design. In particular, it quite reliably broke on Intel FPUs because of rounding problems, as soon as any compiler optimization was allowed, because it tried to apply *decimal* based auto-ticking to time data, which don't adhere to decimal system in any way. This area has been rewritten almost completely since 3.7. Responsibility for it is mine, so I'll try to see how this can be fixed. > They go to hour intervals well before they should. And (even worse) the > x axis gets stretched to be an hour, even if the data only covers part > of the hour. 35 minutes seems to be about the point the problem > manifests. 36 minutes, actually ;-) That's 12 times 3 minutes, and that's the actual threshold the observed behaviour relies on. An easier way to reproduce the problem is: set ydata time set format y '%H:%M:%S' p [1e4 : 1e4 + 36*60 -1] x As given, you get 3-minute major tic intervals. Remove the "-1", and you get 1 hour. I'm not entirely sure why it behaves this way --- the key function in charge of this, quantize_time_tics() returns a quite reasonable 5 minutes as the tic interval for an axis 36 minutes long. The bug seems to happen in the communication between it and 'time_tic_just' which decides on axis endpoints for the plot. -- Hans-Bernhard Broeker (br...@ph...) Even if all the snow were burnt, ashes would remain. |
From: Kelley, S. <Sco...@di...> - 2003-12-01 19:23:49
|
In order to using scalable png's, I just installed gnuplot 3.8j onto a = Redhat7.2 box. I'm trying to plot timeseries data. The autofreq's xtics are not behaving right (i.e. like they did under = gnuplot 3.7). They go to hour intervals well before they should. And (even worse) the = x axis gets stretched to be an hour, even if the data only covers part = of the hour. 35 minutes seems to be about the point the problem = manifests. Any ideas ? My attempt to force expected behavior with various xtic and = mxtics options have not worked. Example - set xdata time set xtics rotate set timefmt "%Y-%m-%d %H:%M:%S" set format x "%Y-%m-%d %H:%M:%S" set terminal png small set output "broke.png" plot "broke.csv" using 1:3 with lines set output "works.png" plot "works.csv" using 1:3 with lines broke.csv 2003-11-25 14:20:00, 1 2003-11-25 14:30:00, 10 2003-11-25 14:56:00, 1 works.csv 2003-11-25 14:20:00, 1 2003-11-25 14:30:00, 10 2003-11-25 14:55:00, 1 --=20 Scott Kelley | Disney Enterprise Services |
From: Petr M. <mi...@ph...> - 2003-11-28 08:08:14
|
> On Tuesday 25 November 2003 05:58, Petr Mikulik wrote: > > > <stdio.h>: FILE *tmpfile(void) > > > > Unfortunately this does not provide name of the file which I could use > > in plot 'tmp_file1' > > You wouldn't need a file name if you wrote the data as an in-line command: > plot '-' > xx xx xx > xx xx xx > E > and then passed the FILE pointer directly to load_file(). > > So the code would look like: > pre1 = tmpfile(); data = tmpfile(); post1 = tmpfile(); > fprintf(pre1, buf1); /* write preliminary commands */ > fprintf(data, buf2); /* write inline data for plot */ > fprintf(post1, buf3); /* write any trailing commands */ > rewind(pre1); rewind(data); rewind(post1); > load_file(pre1, ...); > load_file(data, ...); > load_file(post1, ...); > > > > save set 'tmp_file2' > > A similar trick should work here: > save_set(savefp=tmpfile()); > ... > load_file(savefp, ...); In the final rework, it turned out that it is sufficient to use only one temporary file once submitted to load_file(). --- Petr Mikulik |
From: Ethan M. <merritt@u.washington.edu> - 2003-11-25 20:32:06
|
On Tuesday 25 November 2003 05:58, Petr Mikulik wrote: > > <stdio.h>: FILE *tmpfile(void) > > Unfortunately this does not provide name of the file which I could use > in plot 'tmp_file1' You wouldn't need a file name if you wrote the data as an in-line command= : plot '-' xx xx xx xx xx xx E and then passed the FILE pointer directly to load_file(). So the code would look like: =09pre1 =3D tmpfile(); data =3D tmpfile(); post1 =3D tmpfile(); =09fprintf(pre1, buf1);=09/* write preliminary commands */ =09fprintf(data, buf2);=09/* write inline data for plot */ =09fprintf(post1, buf3);=09/* write any trailing commands */ =09rewind(pre1); rewind(data); rewind(post1); =09load_file(pre1, ...); =09load_file(data, ...); =09load_file(post1, ...); > =09save set 'tmp_file2' A similar trick should work here: =09save_set(savefp=3Dtmpfile()); =09... =09load_file(savefp, ...); --=20 Ethan A Merritt merritt@u.washington.edu Biomolecular Structure Center Box 357742 University of Washington, Seattle, WA 98195 |
From: Petr M. <mi...@ph...> - 2003-11-25 16:06:53
|
> >Unfortunately this does not provide name of the file which I could use in > > plot 'tmp_file1' > > An alternative if these temp files are not too big might be > to slightly alter the "datafile.c" so that it doesn't necessarily > need to read from a file stream but can instead read from > some internal memory stream. That way you could > temporarily put memory on the heap and not have to deal > with files... It could e.g. read from internal memory, and also from shared memory. |
From: Petr M. <mi...@ph...> - 2003-11-25 16:04:25
|
> > Unfortunately this does not provide name of the file which I could use in > > plot 'tmp_file1' > > save set 'tmp_file2' > > Hmm... looks like the right answer would be "don't do that, then", in this > case. I.e. we may have to find a way to generate that test page without > writing any files. E.g. set up gnuplot a function per palette channel > that the core can plot, instead of storing its values to a file. That would need: 1. gnuplot can draw data from memory 2. gnuplot can save its current status of 'set' to recover from the current temporary plot setting Nb 2, alias "push and pop current set status" would be nice, but unfortunately it is not so structured. For now, using temporary save help is quite easy. --- Petr Mikulik |
From: Daniel J S. <dan...@ie...> - 2003-11-25 15:33:28
|
Petr Mikulik wrote: >>>Man page of tmpnam() and of tempnam() says: >>> Never use this function. Use mkstemp(3) instead. >>> >>>Is there any safe and portable way to create a file in a temporary >>>directory, like /tmp or C:\TMP? >>> >>> >><stdio.h>: FILE *tmpfile(void) >> >> > >Unfortunately this does not provide name of the file which I could use in > plot 'tmp_file1' > save set 'tmp_file2' > An alternative if these temp files are not too big might be to slightly alter the "datafile.c" so that it doesn't necessarily need to read from a file stream but can instead read from some internal memory stream. That way you could temporarily put memory on the heap and not have to deal with files... or the equivalent, some type of mechanism to generate an arbitrary function mapping points from one set to another set that you can plot without having to use a datafile but rather a function... or, could datafile.c be rewritten so that the name of the file is not needed, just the FILE *. That is, there is already a special case '-'. Maybe there is something simple to do there. Dan |
From: Hans-Bernhard B. <br...@ph...> - 2003-11-25 15:30:54
|
On Tue, 25 Nov 2003, Petr Mikulik wrote: > > > Man page of tmpnam() and of tempnam() says: > > > Never use this function. Use mkstemp(3) instead. > > > > > > Is there any safe and portable way to create a file in a temporary > > > directory, like /tmp or C:\TMP? > > > > <stdio.h>: FILE *tmpfile(void) > > Unfortunately this does not provide name of the file which I could use in > plot 'tmp_file1' > save set 'tmp_file2' Hmm... looks like the right answer would be "don't do that, then", in this case. I.e. we may have to find a way to generate that test page without writing any files. E.g. set up gnuplot a function per palette channel that the core can plot, instead of storing its values to a file. -- Hans-Bernhard Broeker (br...@ph...) Even if all the snow were burnt, ashes would remain. |
From: Petr M. <mi...@ph...> - 2003-11-25 13:58:27
|
> > Man page of tmpnam() and of tempnam() says: > > Never use this function. Use mkstemp(3) instead. > > > > Is there any safe and portable way to create a file in a temporary > > directory, like /tmp or C:\TMP? > > <stdio.h>: FILE *tmpfile(void) Unfortunately this does not provide name of the file which I could use in plot 'tmp_file1' save set 'tmp_file2' --- Petr Mikulik |
From: Lars H. <lhe...@us...> - 2003-11-25 13:04:56
|
Hans-Bernhard Broeker writes: > On Tue, 25 Nov 2003, Petr Mikulik wrote: > > > Man page of tmpnam() and of tempnam() says: > > Never use this function. Use mkstemp(3) instead. > > > > Is there any safe and portable way to create a file in a temporary > > directory, like /tmp or C:\TMP? > > <stdio.h>: FILE *tmpfile(void) > > It may not be particularly safe, but it's as portable as they come, being > an ANSI/ISO C Standard Library function. You get no control whatsoever > about the directory it places the file in, though. It is quite difficult to do this portably and securly (avoiding races). It's probably best to create a temporary directory (mkdtemp() if available), chmod 700 it, and create all temp files in that directory. I've written some not terribly intelligent code like this for amavis. |
From: Hans-Bernhard B. <br...@ph...> - 2003-11-25 12:57:29
|
On Tue, 25 Nov 2003, Petr Mikulik wrote: > Man page of tmpnam() and of tempnam() says: > Never use this function. Use mkstemp(3) instead. > > Is there any safe and portable way to create a file in a temporary > directory, like /tmp or C:\TMP? <stdio.h>: FILE *tmpfile(void) It may not be particularly safe, but it's as portable as they come, being an ANSI/ISO C Standard Library function. You get no control whatsoever about the directory it places the file in, though. -- Hans-Bernhard Broeker (br...@ph...) Even if all the snow were burnt, ashes would remain. |
From: Hans-Bernhard B. <br...@ph...> - 2003-11-25 12:28:24
|
On Mon, 24 Nov 2003, Petr Mikulik wrote: > ==30824== Invalid read of size 1 > ==30824== at 0x4016371B: strlen (in /usr/lib/valgrind/valgrind.so) > ==30824== by 0x80E88BC: fontpath_handler (variable.c:519) A similar bug seems to be in loadpath_handler, too, where it's easier to trigger: just give the commands test pal test pal in a fresh gnuplot session that does have a loadpath from the environment ($GNUPLOT_LIB is set), and the second one will cause a SIGSEGV in loadpath_handler, in a line that's in exactly the same context as line variable.c:519 which valgrind complained about: (gdb) cont Continuing. Program received signal SIGSEGV, Segmentation fault. 0x080dae74 in loadpath_handler (action=16, path=0x0) at ../../src/variable.c:175 175 p += strlen(p); (gdb) l 170 if (p < limit) 171 return p; 172 else 173 return NULL; 174 } else { 175 p += strlen(p); 176 /* skip over '\0' */ 177 p++; 178 if (p < limit) 179 return p; So the real problem obviously is that 'beenhere' wasn't reset to zero, even though the state of 'p' suggests it has. And the reason for that is pretty clear, too: fontpath_handler() and loadpath_handler() both expect the caller to *always* do ACTION_GET until it gets a NULL return. The code in 'test palette' doesn't do that, and thus it crashes. The right fix would thus be to set 'beenhere' to zero whenever p is NULLed, i.e. on each re-initialization of fontpath_handler() or loadpath_handler, respectively. Actually 'beenhere' serves no useful purpose anyway, as far as I can see. Tests for it can be replaced by the condition (p != NULL), I think. I'm checking in a fix along these lines. -- Hans-Bernhard Broeker (br...@ph...) Even if all the snow were burnt, ashes would remain. |
From: Petr M. <mi...@ph...> - 2003-11-25 09:38:00
|
Further, it was crashing in read-only directory. I've fixed that. The problem is that it needs to write two temporary files ('save set', and palette data). For that, I use mkstemp(). But this functions makes the file in the current directory. Man page of tmpnam() and of tempnam() says: Never use this function. Use mkstemp(3) instead. Is there any safe and portable way to create a file in a temporary directory, like /tmp or C:\TMP? --- Petr Mikulik |
From: Ethan M. <merritt@u.washington.edu> - 2003-11-25 00:38:46
|
On Monday 24 November 2003 07:22, Petr Mikulik wrote: > There seems to be a bug in file > =09variable.c > > Below is an ad-hoc fix -- and actually two possibilities of the fix. > Does someone (Harald?) know what that code is doing and propose a > correct fix? This is a parallel case to the crash I was getting. Mine was in loadpath_handler(), yours in fontpath_handler(). I make the correct fix to be the one given below, but I don't know why this problem is only showing up now: --- gnuplot/src/variable.c=092002-10-11 09:26:49.000000000 -0700 +++ gnuplot-eam/src/variable.c=092003-11-24 16:32:16.000000000 -0800 @@ -161,7 +161,7 @@ =09FPRINTF((stderr, "Get loadpath\n")); =09if (!loadpath) =09 return NULL; -=09if (!beenhere) { +=09if (!beenhere || !p) { =09 /* init section */ =09 beenhere =3D 1; =09 p =3D loadpath; @@ -505,7 +505,7 @@ =09FPRINTF((stderr, "Get fontpath\n")); =09if (!fontpath) =09 return NULL; -=09if (!beenhere) { +=09if (!beenhere || !p) { =09 /* init section */ =09 beenhere =3D 1; =09 p =3D fontpath; --=20 Ethan A Merritt merritt@u.washington.edu Biomolecular Structure Center Box 357742 University of Washington, Seattle, WA 98195 |
From: Ethan M. <merritt@u.washington.edu> - 2003-11-25 00:08:09
|
> So it is in cvs. Works nicely the first time. =20 Crashes on the second. Same behaviour seen for x11, png, and post terminal types gnuplot> set term png font arial Terminal type set to 'png' Options are 'nocrop font arial 12 size 640,480 ' gnuplot> set output 'rgb.png' gnuplot> test palette smooth palette in png: available 157 color positions; using 157 of them gnuplot> test palette Program received signal SIGSEGV, Segmentation fault. 0x401ebbc3 in strlen () from /lib/i686/libc.so.6 (gdb) where #0 0x401ebbc3 in strlen () from /lib/i686/libc.so.6 #1 0x080e8c67 in loadpath_handler (action=3D0, path=3D0x1 <Address 0x1 o= ut of bounds>) at variable.c:175 #2 0x08092612 in save_set_all (fp=3D0x8212240) at save.c:837 #3 0x08090e08 in save_set (fp=3D0x80f6c3c) at save.c:100 #4 0x080536f8 in test_palette_subcommand () at command.c:1371 #5 0x08051e4a in command () at command.c:507 #6 0x080519b5 in do_line () at command.c:364 #7 0x080518d3 in com_line () at command.c:323 #8 0x08084e69 in main (argc=3D1, argv=3D0xbfffec74) at plot.c:609 #9 0x4018f082 in __libc_start_main () from /lib/i686/libc.so.6 --=20 Ethan A Merritt merritt@u.washington.edu Biomolecular Structure Center Box 357742 University of Washington, Seattle, WA 98195 |