From help-request at octave dot org Thu Apr 14 22:16:12 2005 Subject: Re: Alternative to gset nokey; From: Joe Koski To: "John W. Eaton" , "Dmitri A. Sergatskov" CC: Octave Help Date: Thu, 14 Apr 2005 21:15:14 -0600 on 4/14/05 2:46 PM, John W. Eaton at jwe at bevo dot che dot wisc dot edu wrote: > On 14-Apr-2005, Dmitri A. Sergatskov wrote: > > | Joe Koski wrote: > | > Now that I've installed octave-2.1.69, I'm getting all sorts of warnings > | ... > | > warning: gset is deprecated and will be removed from a future > | > warning: version of Octave. > | > warning: You should use the higher-level plot functions > | > warning: ("plot", "mesh", "semilogx", etc.) instead > | ... > | > in the middle of my output. Annoying, but OK, I see the point. What is the > | > now proper equivalent to gset nokey; ? > | > > | > | plot (x,y,";;") > > Or, if you are aiming for compatibility, you can use > > legend ('off'); > plot (x, y); > > Currently, legend is part of Octave-forge. > > jwe John, Dmitri, Thanks for the help; that got me going in the right direction. I elected to go the legend('off') route, but that led me to some other problems. When I use legend.m to actually write a legend with my own text strings, the graw and gset warnings reappear. In looking at the legend.m routine that comes with octave-forge-2004.11.16, it has a dozen or so mentions of gset and graw that are apparently triggering the warnings. I think I know how to rewrite legend.m to use __gnuplot_set__ in place of gset. I've already done that successfully in another routine, my local version of figure.m that sets font and font size. Is __gnuplot_set__ the correct approach, or is there a better, more forward looking way? In legend.m graw appears as tmpfilename=tmpnam; command=["save \"",tmpfilename,"\"\n"]; graw(command); and as new_plot = [new_plot, "\n"]; graw(new_plot); What is the correct replacement for this usage of graw? __gnuplot_set__ does not seem appropriate here. If I get something working, I'll send it to the bug list for possible inclusion. Alternatively, does someone else have a patched version of legend.m already available? Joe ------------------------------------------------------------- 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 -------------------------------------------------------------