|
From: Daniel J S. <dan...@ie...> - 2003-10-31 01:11:23
|
Folks, I've updated some patches on SourceForge (with much of Petr's help) that I'd like people to test and consider for integration into Gnuplot. One is a moderate length patch for unlimited X11 windows. The other is the longer patch for image and binary data file support. I will briefly discuss the two in separate emails... Patch 774822 Unlimited plot windows for X11 terminals. linked_list_103003.diff The unlimited X11 windows patch consists of the one file listed above. The strategy here was to take the large table containing information about the window and add a few pointers for a doubly-linked list and an identifier (the window #). Then there is a large chunk of code to support the linked list. It actually is fairly straightforward with a few short routines like "Add_To_List", "Remove_From_List", etc. The only tricky part was robustly cleaning up plots that are deleted via the OS, e.g., pressing the close button of the window. That requires a queue for deleting plots because otherwise the OS error handler could delete a plot that gnuplot_x11 is currently accessing. In any case, it has been very robust and I can't recall ever seeing gnuplot_x11 go defunct with this strategy. I've also run this through Octave to generate a couple hundred plots on the screen and it works fine. So, in summary, the structure of 16 plots has been replaced by a linked list. Petr has tested the patch and also gave some good suggestions for additions. Also, the issue of closing a window has come up on the list, so I added a "close", although there may be an issue with the different pipes. (Try it, see if it suitable.) The X11_options() routine has been cleaned up to do reasonable sanity checks and to not change anything unless a valid "set term" command is entered. This is more in line with the manner in which "plot" and "splot" behave. There is documentation in Gnuplot, but some examples are set term x11 145 title "Hello World" plot sin(x) set term x11 close Dan -- Dan Sebald email: daniel . sebald @ ie ee . o rg URL: ht tp://acer-access.c om/~dsebald @ acer-access.c om/ |
|
From: Petr M. <mi...@ph...> - 2003-10-31 10:50:03
|
> So, in summary, the structure of 16 plots has been replaced by a linked > list. I propose to add this patch into current cvs. (That limit of 16 windows is considered as a bug by some people, mainly when using it with Octave's figure(n) function.) The patch works for me fine on OS/2-X11, Linux and Windows/Cygwin-X11. > set term x11 145 title "Hello World" This "title" option is cool as well (OS/2 terminal had this for years). BTW, I've noticed that there is a bug visible on some enhanced terminals (PM and gd enhanced patch by Ethan): all text is flushed left instead of right. --- Petr Mikulik |
|
From: Ethan M. <merritt@u.washington.edu> - 2003-10-31 16:58:59
|
On Friday 31 October 2003 02:50, Petr Mikulik wrote: > > So, in summary, the structure of 16 plots has been replaced by a > > linked list. > > I propose to add this patch into current cvs. (That limit of 16 windows > is considered as a bug by some people, mainly when using it with > Octave's figure(n) function.) So far it works here also, but I have not tested it very thoroughly. > BTW, I've noticed that there is a bug visible on some enhanced terminal= s > (PM and gd enhanced patch by Ethan): all text is flushed left instead o= f right. What is PM? Text justification in gd+enhanced would be difficult, although I think it is possible with some work. It is much harder than in PostScript becaus= e libgd does not provide equivalent operators such as gsave/grestore. A lot more would have to be done in software. But I did block out the code in principle. A bigger problem is that libgd is still not handling symbol fonts correctly. I have mailed patches toTom Boutell, but they ha= ve not yet made it into a released version. --=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-10-31 17:11:07
|
> > BTW, I've noticed that there is a bug visible on some enhanced terminals > > (PM and gd enhanced patch by Ethan): all text is flushed left instead of right. > > What is PM? OS/2 Presentation Manager terminal (set term pm) > Text justification in gd+enhanced would be difficult, although I think it The bug is somewhere else -- it looks like *all* text is wrongly justified, even when using no enhanced features in any text. > is possible with some work. It is much harder than in PostScript because > libgd does not provide equivalent operators such as gsave/grestore. > A lot more would have to be done in software. It would need a routine like strlen_enhanced_text(char*) which would estimate the width of the label. Additionally, it would be of great use for gnuplot's auto sizing of margins et al, where it counts all characters of "/Symbol ...". --- Petr Mikulik |
|
From: Petr M. <mi...@ph...> - 2003-11-18 14:00:41
|
> that I'd like people to test and consider for integration into Gnuplot. One > is a moderate length patch for unlimited X11 windows. The other is the > longer patch for image and binary data file support. I will briefly discuss > the two in separate emails... > > Patch 774822 Unlimited plot windows for X11 terminals. > > linked_list_103003.diff I think the patch has been carefully tested by several people and it works fine. What about if I move it to cvs? --- Petr |
|
From: Ethan M. <merritt@u.washington.edu> - 2003-11-18 17:35:29
|
On Tuesday 18 November 2003 06:00, Petr Mikulik wrote: > > Patch 774822 Unlimited plot windows for X11 terminals. > > I think the patch has been carefully tested by several people and it > works fine. What about if I move it to cvs? OK by me. --=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-24 15:54:01
|
> > that I'd like people to test and consider for integration into Gnuplot. One > > is a moderate length patch for unlimited X11 windows. The other is the > > longer patch for image and binary data file support. I will briefly discuss > > the two in separate emails... > > > > Patch 774822 Unlimited plot windows for X11 terminals. > > > > linked_list_103003.diff > > I think the patch has been carefully tested by several people and it works > fine. What about if I move it to cvs? It is there. Thanks for the patch. === What I would really love now is that "space-bar" hotkey working in x11 terminal in gnuplot running under KDE's Konsole. It works in xterm, gnome terminal, but not in Konsole. I've tried to ask at several places, but nobody answered. Does somebody an idea what to do now? Whom/where to ask for help? --- Petr Mikulik |
|
From: Ethan M. <merritt@u.washington.edu> - 2003-11-24 16:53:52
|
On Monday 24 November 2003 07:53, Petr Mikulik wrote: > What I would really love now is that "space-bar" hotkey working in x11 > terminal in gnuplot running under KDE's Konsole. It works in xterm, > gnome terminal, but not in Konsole. I've tried to ask at several places= , > but nobody answered. > > Does somebody an idea what to do now? Whom/where to ask for help? I've no idea, but I don't think this has anything in particular to do wit= h gnuplot. Konsole is broken in so many ways that I gave up on it long ago. There are so many good alternatives (xterm, rxvt, eterm,...) that it does= not seem worth worrying about. --=20 Ethan A Merritt merritt@u.washington.edu Biomolecular Structure Center Box 357742 University of Washington, Seattle, WA 98195 |