[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
text command in octave ??
John W. Eaton
text command in octave ??
Fri, 15 May 1998 01:27:29 -0500 (CDT)
On 14-May-1998, Peter Biechele <address@hidden> wrote:
| 1) Is there a text command in octave resembling the text coammand from
| Matlab 5 ?? Because there is a set label command in Gnuplot, it shouldn´t
| be too difficult to implement the text command ??!!
Here's a start.
function text (x, y, s)
## It seems newline characters cause trouble for gnuplot, so we're
## going to remove them.
s = strrep (s, "\n", " ");
eval (sprintf ("gset label \"%s\" at %g,%g", s, x, y));
Changes for better error checking, handling x-y-z coordinates for 3D
plots, etc. would be welcome.
| 2) in Matlab 5, they changed the clg command to clf! What is an easy way
| to get Matlab 5 compatability ??
I don't use Matlab, so it would help if you provided more details
explaining exactly what the compatibility issues are. Or maybe you
should complain to the MathWorks about breaking backward compatibility
| 3) hist function: In Matlab 5 the hist function used with one output
| argument returns only the values of the bins, not the centers. In Octave,
| you have to use two output arguments, always !!!
| REMARK: This is just for reference, I think the ocatve way of doing it,
| is much better. But maybe you want to include this remark for
| compatibility reasons !!
That's easy enough to fix, so I will do it for the next release. Now
would someone like to fix the hist function so that it can handle
matrix arguments too?
| 4) There are two other differences between Matlab 5 Plotting and Octave:
| In Matlab it doesn´t matter, if the xlabel, title ... commands are
| given before or after the actual plot command. In Octave the plot command
| has to be the last one.
Try setting the automatic_replot variable to 1.
| In subsequent calls to the plot command (using
| subplots) the axis command turns autoscaling off, if a plotting range was
| specified for the first plot. In Matlab 5 the autoscaling is turned on
| again, for each subplot. Maybe it would be a good idea to reset ALL the
| gnuplot "set" commands (such as xlabel, ylabel..) , so that e.g. there are
| no xlabels previously defined, appearing in a new plot.
Please suggest a patch that will work reliably, and I will consider
| 5) There is no errorbar() plotting function, although Gnuplot does support
| errorbar plotting !
Consider writing one and contributing it!
| REMARK: Octave is a GREAT and USEFUL program.
Thanks. I think it would be more useful if more people would
contribute more. If only a small fraction of the people interested in
hacking on the Linux kernel were instead interested in working on
improving Octave, it might have a lot more features.
| We enjoy it very much and we don´t want to criticize the Octave
| project. We just want to mention some differences betweeen Matlab 5
| and Octave, so everybody can easily switch over to Octave !!!
If you actually switch, compatibility tends to become less important! :-)
| Because we use Matlab for many lectures and courses, we would like to have
| almost full compatability of Octave with Matlab 5.
Gag. Do you really want bug-for-bug compatibility?