|
View:
New views
20 Messages
—
Rating Filter:
Alert me
|
|
|
octave's graphics interface / linux operating systemDear listmembers,
I am using gnuplot output very regularly within documents I produce with latex. In order to achieve a really good quality I found it very convenient to produce postscript output and convert this to pdf afterwards. Moreover, the attributes of the text, additional labels / arrows / whatsoever can be integrated in the graph. Now, through the recent modifications in octave, the direct access to gnuplot through octave became more difficult - don't take me wrong I do not mind. In order to further process the graphs I use additional code to output data into files, prepare gnuplot configuration files and call gnuplot finally with a system command out of octave. This is managable but circumstancial. My question is now twofold: 1.) is it possible to force octave to write all data into files rather than piping them into gnuplot (or does this happen anyway?)? 2.) is there a way to force octave to write it's gnuplot config file into a gnuplot compiliant config file in order to simplify further gnuplot processing of the data (and to not be forced to do everything manually) Thank you very much, take care Dieter Jurzitza -- ----------------------------------------------------------- | \ /\_/\ | | ~x~ |/-----\ / \ /- \_/ ^^__ _ / _ ____ / <°°__ \- \_/ | |/ | | || || _| _| _| _| if you really want to see the pictures above - use some font with constant spacing like courier! :-) ----------------------------------------------------------- _______________________________________________ Help-octave mailing list Help-octave@... https://www.cae.wisc.edu/mailman/listinfo/help-octave |
|
|
Re: octave's graphics interface / linux operating systemDieter Jurzitza wrote:
> Dear listmembers, > I am using gnuplot output very regularly within documents I produce with > latex. In order to achieve a really good quality I found it very convenient > to produce postscript output and convert this to pdf afterwards. > Moreover, the attributes of the text, additional labels / arrows / whatsoever > can be integrated in the graph. > > Now, through the recent modifications in octave, the direct access to gnuplot > through octave became more difficult - don't take me wrong I do not mind. > In order to further process the graphs I use additional code to output data > into files, prepare gnuplot configuration files and call gnuplot finally with > a system command out of octave. This is managable but circumstancial. > > My question is now twofold: > 1.) is it possible to force octave to write all data into files rather than > piping them into gnuplot (or does this happen anyway?)? Not really. > 2.) is there a way to force octave to write it's gnuplot config file into a > gnuplot compiliant config file in order to simplify further gnuplot > processing of the data (and to not be forced to do everything manually) I use drawnow ("x11", "/dev/null", false, "file.gp") that creates a file called file.gp with the raw gnuplot commands that can be used directly with gnuplot's load command D. _______________________________________________ Help-octave mailing list Help-octave@... https://www.cae.wisc.edu/mailman/listinfo/help-octave |
|
|
Re: octave's graphics interface / linux operating system>2.) is there a way to force octave to write it's gnuplot config file into a
>gnuplot compiliant config file in order to simplify further gnuplot >processing of the data (and to not be forced to do everything manually) This is not an answer to your question, but you may find the EPS Toolkit useful. It is a set of primitives that you can use to create an eps plot. You find it at http://www.epstk.de/, or as the octave-epstk package. -- Francesco Potortì (ricercatore) Voice: +39 050 315 3058 (op.2111) ISTI - Area della ricerca CNR Fax: +39 050 315 2040 via G. Moruzzi 1, I-56124 Pisa Email: Potorti@... Web: http://fly.isti.cnr.it/ Key: fly.isti.cnr.it/public.key _______________________________________________ Help-octave mailing list Help-octave@... https://www.cae.wisc.edu/mailman/listinfo/help-octave |
|
|
Re: octave's graphics interface / linux operating systemHi all, I was in Dieter's situation last year, and I took the same path. That is, writing a few functions to save data and call gnuplot (code available at [1]). I wasn't aware of the drawnow trick, which indeed seems to offer means to customize the output. I also see the online documentation is fairly recent, maybe it is time for me to switch back to out-of-the-box octave plotting functions. Cheers, Etienne [1] http://users.isr.ist.utl.pt/~etienne/code/code.html#OctaveGnuplot [2] http://www.gnu.org/software/octave/doc/interpreter On Sun, May 11, 2008 11:31, David Bateman wrote: # Dieter Jurzitza wrote: #> Dear listmembers, #> I am using gnuplot output very regularly within documents I produce with #> latex. In order to achieve a really good quality I found it very convenient #> to produce postscript output and convert this to pdf afterwards. #> Moreover, the attributes of the text, additional labels / arrows / #> whatsoever #> can be integrated in the graph. #> #> Now, through the recent modifications in octave, the direct access to #> gnuplot #> through octave became more difficult - don't take me wrong I do not mind. #> In order to further process the graphs I use additional code to output data #> into files, prepare gnuplot configuration files and call gnuplot finally #> with #> a system command out of octave. This is managable but circumstancial. #> #> My question is now twofold: #> 1.) is it possible to force octave to write all data into files rather than #> piping them into gnuplot (or does this happen anyway?)? # # Not really. # #> 2.) is there a way to force octave to write it's gnuplot config file into a #> gnuplot compiliant config file in order to simplify further gnuplot #> processing of the data (and to not be forced to do everything manually) # # I use # # drawnow ("x11", "/dev/null", false, "file.gp") # # that creates a file called file.gp with the raw gnuplot commands that # can be used directly with gnuplot's load command # # D. # # _______________________________________________ # Help-octave mailing list # Help-octave@... # https://www.cae.wisc.edu/mailman/listinfo/help-octave # -- http://www.isr.ist.utl.pt/~etienne _______________________________________________ Help-octave mailing list Help-octave@... https://www.cae.wisc.edu/mailman/listinfo/help-octave |
|
|
Re: octave's graphics interface / linux operating systemsøn, 11 05 2008 kl. 15:53 -0700, skrev etienne@...:
> I wasn't aware of the drawnow trick I think it should be stated (you know, just for the record), that the 'drawnow' trick David mentioned is likely to be removed in later versions of Octave. It is mostly ment for debugging, so don't count on it staying forever... Søren _______________________________________________ Help-octave mailing list Help-octave@... https://www.cae.wisc.edu/mailman/listinfo/help-octave |
|
|
Re: octave's graphics interface / linux operating systemSøren Hauberg wrote:
> søn, 11 05 2008 kl. 15:53 -0700, skrev etienne@...: > >> I wasn't aware of the drawnow trick >> > > I think it should be stated (you know, just for the record), that the > 'drawnow' trick David mentioned is likely to be removed in later > versions of Octave. It is mostly ment for debugging, so don't count on > it staying forever... > I'd be against removing it. Though I don't believe that all graphics backends need to respect the fourth argument to drawnow.. Though you're right in that this "trick" is not documented. I suppose that to make it official it should be documented. D. -- David Bateman David.Bateman@... Motorola Labs - Paris +33 1 69 35 48 04 (Ph) Parc Les Algorithmes, Commune de St Aubin +33 6 72 01 06 33 (Mob) 91193 Gif-Sur-Yvette FRANCE +33 1 69 35 77 01 (Fax) The information contained in this communication has been classified as: [x] General Business Information [ ] Motorola Internal Use Only [ ] Motorola Confidential Proprietary _______________________________________________ Help-octave mailing list Help-octave@... https://www.cae.wisc.edu/mailman/listinfo/help-octave |
|
|
Re: octave's graphics interface / linux operating system--- David Bateman <adb014@...> wrote: > Dieter Jurzitza wrote: > > Dear listmembers, > > I am using gnuplot output very regularly within documents I produce with > > latex. In order to achieve a really good quality I found it very convenient > > to produce postscript output and convert this to pdf afterwards. > > Moreover, the attributes of the text, additional labels / arrows / whatsoever > > can be integrated in the graph. > > > > Now, through the recent modifications in octave, the direct access to gnuplot > > through octave became more difficult - don't take me wrong I do not mind. > > In order to further process the graphs I use additional code to output data > > into files, prepare gnuplot configuration files and call gnuplot finally with > > a system command out of octave. This is managable but circumstancial. > > > > My question is now twofold: > > 1.) is it possible to force octave to write all data into files rather than > > piping them into gnuplot (or does this happen anyway?)? > > Not really. > Well, 'octave' has 'gnuplot_binary' command. Using it one can use gnuplot impersonator which intercepts octave's STDOUT with 'gnuplot' commands - I used to have a Perl script doing this and writing its STDIN to file, parsing it on the fly. Regards, Sergei. Applications From Scratch: http://appsfromscratch.berlios.de/ ____________________________________________________________________________________ Be a better friend, newshound, and know-it-all with Yahoo! Mobile. Try it now. http://mobile.yahoo.com/;_ylt=Ahu06i62sR8HDtDypao8Wcj9tAcJ _______________________________________________ Help-octave mailing list Help-octave@... https://www.cae.wisc.edu/mailman/listinfo/help-octave |
|
|
Re: octave's graphics interface / linux operating systemSergei Steshenko wrote:
> --- David Bateman <adb014@...> wrote: > > >> Dieter Jurzitza wrote: >> >>> Dear listmembers, >>> I am using gnuplot output very regularly within documents I produce with >>> latex. In order to achieve a really good quality I found it very convenient >>> to produce postscript output and convert this to pdf afterwards. >>> Moreover, the attributes of the text, additional labels / arrows / whatsoever >>> can be integrated in the graph. >>> >>> Now, through the recent modifications in octave, the direct access to gnuplot >>> through octave became more difficult - don't take me wrong I do not mind. >>> In order to further process the graphs I use additional code to output data >>> into files, prepare gnuplot configuration files and call gnuplot finally with >>> a system command out of octave. This is managable but circumstancial. >>> >>> My question is now twofold: >>> 1.) is it possible to force octave to write all data into files rather than >>> piping them into gnuplot (or does this happen anyway?)? >>> >> Not really. >> >> > > Well, 'octave' has 'gnuplot_binary' command. > > Using it one can use gnuplot impersonator which intercepts octave's STDOUT with 'gnuplot' > commands - I used to have a Perl script doing this and writing its STDIN to file, parsing it on > the fly. > > D. -- David Bateman David.Bateman@... Motorola Labs - Paris +33 1 69 35 48 04 (Ph) Parc Les Algorithmes, Commune de St Aubin +33 6 72 01 06 33 (Mob) 91193 Gif-Sur-Yvette FRANCE +33 1 69 35 77 01 (Fax) The information contained in this communication has been classified as: [x] General Business Information [ ] Motorola Internal Use Only [ ] Motorola Confidential Proprietary _______________________________________________ Help-octave mailing list Help-octave@... https://www.cae.wisc.edu/mailman/listinfo/help-octave |
|
|
Re: octave's graphics interface / linux operating systemHello Sergei,
this is to me a bit to cryptic, can you provide a practical example? Regards, Stefan *** 2008/5/12, Sergei Steshenko <sergstesh@...>:
-- Tel.: 0731-3805149 Ochsensteige 48 89075 Ulm _______________________________________________ Help-octave mailing list Help-octave@... https://www.cae.wisc.edu/mailman/listinfo/help-octave |
|
|
Re: octave's graphics interface / linux operating system--- Stefan Pofahl <stefan@...> wrote: > Hello Sergei, > > this is to me a bit to cryptic, can you provide a practical > example? > > Regards, > > Stefan > > *** > > 2008/5/12, Sergei Steshenko <sergstesh@...>: > > > > > > --- David Bateman <adb014@...> wrote: > > > > > Dieter Jurzitza wrote: > > > > > > > > Well, 'octave' has 'gnuplot_binary' command. > > > > Using it one can use gnuplot impersonator which intercepts octave's STDOUT > > with 'gnuplot' > > commands - I used to have a Perl script doing this and writing its STDIN > > to file, parsing it on > > the fly. > > > > Regards, > > Sergei. > > > > > > Applications From Scratch: http://appsfromscratch.berlios.de/ > > > > > > > > > > ____________________________________________________________________________________ > > Be a better friend, newshound, and > > know-it-all with Yahoo! Mobile. Try it now. > > http://mobile.yahoo.com/;_ylt=Ahu06i62sR8HDtDypao8Wcj9tAcJ > > > > _______________________________________________ > > Help-octave mailing list > > Help-octave@... > > https://www.cae.wisc.edu/mailman/listinfo/help-octave > > > > > > -- > Tel.: 0731-3805149 > Ochsensteige 48 > 89075 Ulm > The idea of the script was: 1) to store data sent to 'gnuplot' in temporary files; 2) when actual 'plot' command is encountered, to call 'gnuplot' with the temporary files. For this particular script to work I had to slightly change 'octave' plotting routines to produce more easily parseable output. This all was done in order to enable mouse zooming - the released gnuplot-4.2.3 does not have mouse zooming woeking when input comes to it through STDIN; recent binary snapshots have this problem resolved, so I do not need the script anymore. Anyway, in the attached script 'main_loop' routine iterates over STDIN lines, separating the stream into commands - see $commands_file, $_commands_file_fh and data - see $data_file, $_data_file_fh. The 152 $line =~ s/^"-"/"$data_file"/; line substitutes "-", i.e. the instruction for 'gnuplot' to accept data from STDIN with "$data_file", i.e. the instruction for 'gnuplot' to accept data from $data_file. The script was a hack, but it illustrates the idea of intercepting STDIN. ... For your purposes you can probably also specify 'gnuplot' using 'gnuplot_binary' more or less this way: gnuplot_binary("| tee gnuplot_input.txt | /actual/path/to/gnuplot"); or just gnuplot_binary("| tee gnuplot_input.txt | gnuplot"); - in the above 'tee' will both write everything sent to 'gnuplot' to 'gnuplot_input.txt' file and will send to 'gnuplot' what's been sent to it by 'octave'. Try http://linux.die.net/man/1/tee to read 'tee' manpage. Regards, Sergei. Applications From Scratch: http://appsfromscratch.berlios.de/ ____________________________________________________________________________________ Be a better friend, newshound, and know-it-all with Yahoo! Mobile. Try it now. http://mobile.yahoo.com/;_ylt=Ahu06i62sR8HDtDypao8Wcj9tAcJ _______________________________________________ Help-octave mailing list Help-octave@... https://www.cae.wisc.edu/mailman/listinfo/help-octave |
|
|
Re: octave's graphics interface / linux operating systemDear listmembers,
first of all, many thanks for all the inputs I received. And, David, many thanks for the suggested function. Personally, I vote strongly against removing this function from octave, too. It would throw everyone back singnificantly who is working closely with gnuplot. As long as there is no straightforward way to create "publication-quality" graphs out of octave and as long as I am forced to fiddle around with gnuplot parameters and commands I (probably) have a different approach from others. And, to stop any discussion from rising, I do not think there is a way to emit a command like (maybe I just didn't find ...) set terminal postscript enhanced color solid "Arial,14" or a command like plot function(x) title {/Symbol W} w l lw 2 from within octave without manually writing a function that writes those commands into a file. And, again, _I do not_ want to request an integration of things like this into octave. Apart from "niceness" of interfaces to provide a matlab compatibilty (this is a personal guess, I never used mathlab so I do not know much about it) this triggers me into learning two sets of commands, the gnuplot commands I am very familiar with and the octave commands that differ but provide only a part of the function set of gnuplot at the very end. And in my opinion it is a pity - and a waste of time - to force capable programers to implement one function translator after the other to only mirror a command set - more or less. So, from an (personal!) user prospective I prefer functionality over programming niceness - as long as the tools provided are not capable to do the entire job, which is not to be expected IMHO - see above. I do not want to raise a discussion on whether the "raw" gnuplot commands should be kept alive. A decision has been made, I live with it. The only tiny (well, maybe not _that_ tiny ...) little wish I would appreciate to rise would be a function called gnuplotout (or whatever name is apropriate) that outputs both the configuration file and the data to be plotted so the further work is not that effortsome. Just my 2 cents here. And again, thanks to everybody - this tells me that more people than me are struggling to get smooth graphs for their publications / presentations / daily work. Take care, Dieter P.S. and thank you for doing all the work on octave, I guess I missed mentioning by the way ..... -- ----------------------------------------------------------- | \ /\_/\ | | ~x~ |/-----\ / \ /- \_/ ^^__ _ / _ ____ / <°°__ \- \_/ | |/ | | || || _| _| _| _| if you really want to see the pictures above - use some font with constant spacing like courier! :-) -----------------------------------------------------------Am Montag, 12. Mai 2008 10:04:50 schrieb David Bateman: > Søren Hauberg wrote: > > søn, 11 05 2008 kl. 15:53 -0700, skrev etienne@...: ******* _______________________________________________ Help-octave mailing list Help-octave@... https://www.cae.wisc.edu/mailman/listinfo/help-octave |
|
|
Re: octave's graphics interface / linux operating system--- Dieter Jurzitza <dieter.jurzitza@...> wrote: > Dear listmembers, > first of all, many thanks for all the inputs I received. And, David, many > thanks for the suggested function. Personally, I vote strongly against > removing this function from octave, too. It would throw everyone back > singnificantly who is working closely with gnuplot. As long as there is no > straightforward way to create "publication-quality" graphs out of octave and > as long as I am forced to fiddle around with gnuplot parameters and commands > I (probably) have a different approach from others. > > And, to stop any discussion from rising, I do not think there is a way to emit > a command like (maybe I just didn't find ...) > > set terminal postscript enhanced color solid "Arial,14" > > or a command like > > The only tiny > (well, maybe not _that_ tiny ...) little wish I would appreciate to rise > would be a function called gnuplotout (or whatever name is apropriate) that > outputs both the configuration file and the data to be plotted so the further > work is not that effortsome. Just my 2 cents here. What about gnuplot_binary("| tee gnuplot_input.txt | gnuplot"); - "gnuplot_input.txt" above is what is sent to 'gnuplot'. Regards, Sergei. Applications From Scratch: http://appsfromscratch.berlios.de/ _______________________________________________ Help-octave mailing list Help-octave@... https://www.cae.wisc.edu/mailman/listinfo/help-octave |
|
|
Re: octave's graphics interface / linux operating systemOn 13-May-2008, Dieter Jurzitza wrote:
| I do not want to raise a discussion on whether the "raw" gnuplot commands | should be kept alive. A decision has been made, I live with it. The only tiny | (well, maybe not _that_ tiny ...) little wish I would appreciate to rise | would be a function called gnuplotout (or whatever name is apropriate) that | outputs both the configuration file and the data to be plotted so the further | work is not that effortsome. Just my 2 cents here. This assumes that gnuplot is even used for generating plots. It's likely that at some time in the reasonably near future this will no longer be true for Octave, or at least that the default (and probably more complete and actively maintained) plotting backend will not be based on gnuplot. | And again, thanks to everybody - this tells me that more people than me are | struggling to get smooth graphs for their publications / presentations / | daily work. If you prefer using gnuplot commands, then I suggest splitting computation from plotting, and writing out your data to files, then using gnuplot separately to generate the plots. jwe _______________________________________________ Help-octave mailing list Help-octave@... https://www.cae.wisc.edu/mailman/listinfo/help-octave |
|
|
Re: octave's graphics interface / linux operating systemQuoting "John W. Eaton" <jwe@...>:
> If you prefer using gnuplot commands, then I suggest splitting > computation from plotting, and writing out your data to files, then > using gnuplot separately to generate the plots. It seems to me that a lot of people would like to use gnuplot more directly. So, I guess it would be nice if somebody stepped up and created an interface to gnuplot. Something that would allow you to visualize your data from Octave using a syntax closer to the one used in gnuplot. This should of course be a separate package. Personally, I'm satisfied with the quality of the current output (it might not be "pulication quality" but publishers don't complain...), so I'm not going to spend time on this... Søren _______________________________________________ Help-octave mailing list Help-octave@... https://www.cae.wisc.edu/mailman/listinfo/help-octave |
|
|
Re: octave's graphics interface / linux operating system>It seems to me that a lot of people would like to use gnuplot more
>directly. Maybe the issue is that when one begins to write a program, the builtin plotting commands are very quick and handy, that's why one wants to use them. When the program nears the production stage, it would be nice to keep using the same commands with small and incremental variations to get closer to professional quality. The trick of sending the gnuplot commands to a file for further refining satisfies this need. -- Francesco Potortì (ricercatore) Voice: +39 050 315 3058 (op.2111) ISTI - Area della ricerca CNR Fax: +39 050 315 2040 via G. Moruzzi 1, I-56124 Pisa Email: Potorti@... (entrance 20, 1st floor, room C71) Web: http://fly.isti.cnr.it/ _______________________________________________ Help-octave mailing list Help-octave@... https://www.cae.wisc.edu/mailman/listinfo/help-octave |
|
|
Re: octave's graphics interface / linux operating systemHi Sergei,
did you test what you suggested? I get tons of messages about broken pipes - nothing that could be used, seriously. Thanks for the hint, anyway, take care Dieter -- ----------------------------------------------------------- | \ /\_/\ | | ~x~ |/-----\ / \ /- \_/ ^^__ _ / _ ____ / <°°__ \- \_/ | |/ | | || || _| _| _| _| if you really want to see the pictures above - use some font with constant spacing like courier! :-) -----------------------------------------------------------Am Mittwoch, 14. Mai 2008 03:03:20 schrieb Sergei Steshenko: *********** > What about > > gnuplot_binary("| tee gnuplot_input.txt | gnuplot"); > > - "gnuplot_input.txt" above is what is sent to 'gnuplot'. ******* _______________________________________________ Help-octave mailing list Help-octave@... https://www.cae.wisc.edu/mailman/listinfo/help-octave |
|
|
Re: octave's graphics interface / linux operating system |