help-octave
[Top][All Lists]
Advanced

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

Re: Plotting with Octave 3.0


From: Ivan Sutoris
Subject: Re: Plotting with Octave 3.0
Date: Thu, 25 Sep 2008 21:39:23 +0200

On Thu, Sep 25, 2008 at 3:02 PM, Jean-Marc Valin
<address@hidden> wrote:
> Hi all,
>
> I'd like to know if someone could explain to me how to plot properly
> with the new 3.0 version. I do a lot of plotting for publications (i.e.
> has to be reasonably pretty) and find that a lot of the things that I
> used to be able to do with 2.1 no longer work.

Hi

Plotting in 3.0 is more compatible with matlab, which means once you
make a plot, you can use get() / set() functions to retrieve or change
properties of individual graphic objects in the plot. For example, to
set ticks manually, you edit xtick property of axes object, like this:

plot(1:5)
set(gca(),'xtick',[1 3 5]) % have ticks at odd numbers only

In this code, gca() returns reference to current axes. See section
about 'advanced plotting' in the manual for list of graphic objects
and their properties (or use get(gca()) to retrieve list of all
properties of the object passed as parameter, in this case current
axes). If you really prefer old gnuplot commands, you could just save
your data in text file and then run gnuplot script outside of
Octave...

Ivan Sutoris


reply via email to

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