From help-request at octave dot org Thu Oct 13 15:11:51 2005 Subject: Re: save and reload plots From: "Corbin Champion" To: antiskid56-octave at yahoo dot com, help@octave.org Date: Thu, 13 Oct 2005 20:11:00 +0000 I am surprised with this response. There is a save and load command in gnuplot... The option that GnuPlot gives for saving work is the save command. If you type the following: save "mywork.gnu" GnuPlot will then create a text file with the name you gave it that includes set commands for every possible setting in GnuPlot. You can then load this file to continue work where you left off. And load, loads that filename. I was wondering, has someone has done this before or if there is already an octave command for doing this, save and load. How about this...is there way to send any arbitrary command to gnuplot. ie, what if I want to send to gnuplot "save temp.gnu". Is there a function for sending any command to gnuplot? If so, I can probably rig this up. >From: "James R. Phillips" >Reply-To: antiskid56-octave at yahoo dot com >To: help at octave dot org >Subject: Re: save and reload plots >Date: Thu, 13 Oct 2005 10:46:43 -0700 (PDT) > >--- Corbin Champion wrote: > > > How do I save and restore plots: > > > > Ideally, I want to be able to create plots - I am using gnuplot as is >most > > common > > Save all current figures > > Save workspace from before > > quit octave > > Open octave > > Load workspace from before > > load all figures from before > > Be able to view or modify plots as I could if I didn't quit the first > > session > > > > I would like to have things like the hold state (ie hold on) etc >preserved > > from before as well. > > Could someone describe how this can be done? > > > > Thanks in advance for any help! > > Corbin > > > >You may not like this kind of help, but basically it isn't possible to do >what >you want to do. You can save a script that creates a plot; you can save >the >output of the plot in a postscript file, but you can't save the state of >gnuplot and resume it. It isn't designed to achieve that goal. > >To come some ways toward achieving your goal, always create your plots from >a >script, say make_plots.m. Keep your script, and you can use it to >recreate/modify the plots. Modify your plot by continually modifying your >script, and re-running it until the plot looks like you want it to look. > >It is often useful to segment computational tasks, saving the state of the >task >at convenient points. Thus, do most of the computations, and save the >results >as an octave data file. Then start the plotting task by loading the saved >results, and running the plot script. In this way modifying the plots does >not >require redoing all the computations. > >I like to further automate my analyses by using gnu make with octave, >putting >octave commands in a makefile. See e.g. >http://www.octave.org/mailing-lists/octave-sources/2005/14 > >The key to using gnuplot effectively is to "think like gnuplot". You might >want to look at the gnuplot "not so frequently asked questions": >http://t16web.lanl.gov/Kawano/gnuplot/index-e.html > >Good luck. > >jrp > > > >------------------------------------------------------------- >Octave is freely available under the terms of the GNU GPL. > >Octave's home on the web: http://www.octave.org >How to fund new projects: http://www.octave.org/funding.html >Subscription information: http://www.octave.org/archive.html >------------------------------------------------------------- > ------------------------------------------------------------- Octave is freely available under the terms of the GNU GPL. Octave's home on the web: http://www.octave.org How to fund new projects: http://www.octave.org/funding.html Subscription information: http://www.octave.org/archive.html -------------------------------------------------------------