help-octave
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: bring back gset


From: David Bateman
Subject: Re: bring back gset
Date: Mon, 17 Nov 2008 22:16:12 +0100
User-agent: Mozilla-Thunderbird 2.0.0.17 (X11/20081018)

Ethan Tira-Thompson wrote:
Just my 2¢ on the gset -> __gnuplot_set__ -> obsolete transition: I disagree strongly.

My understanding from other postings is that octave aims to be Matlab compatible, but I see no reason to restrict everyone to Matlab's feature set. I don't care about Matlab compatability, I want to be able to directly tweak my gnuplot output. I understand others do want Matlab compatibility, but they can simply avoid using 'gset'.

Perhaps the better way to do this instead of writing off opportunities for innovation within octave, is to create an environment setting 'MATLAB_STRICT' or some such, which if set, displays an error/warning if non-matlab commands are encountered, but if unset doesn't worry about it.

You could go a step further with this and use the setting as a matlab version number, so users could even track if they use a feature unavailable in the specific version of matlab of concern.

The simple fact is that you can't mix handle graphics with direct calls to gnuplot as you can manipulate the plots in such a way that Octave
doesn't know about and the next call to drawnow will remove all the
changes you made with gset. This is the basic reason for the removal of
gset....

If you really really really want gset, even though you will likely break
your plots try something

figure(1)
drawnow();
plot_stream = get (gcf(), "__plot_stream__");
fputs (plot_stream, "set xlabel 'X axis';\n set ylabel 'Y axis';\n");
fputs (plot_stream, "plot sin (x);\n")
fflush (plot_stream);

I think you can imagine the rest.

D.





--
David Bateman                                address@hidden
35 rue Gambetta                              +33 1 46 04 02 18 (Home)
92100 Boulogne-Billancourt FRANCE            +33 6 72 01 06 33 (Mob)


reply via email to

[Prev in Thread] Current Thread [Next in Thread]