[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: gnuplot versus matlab plot: a suggestion
From: |
etienne |
Subject: |
Re: gnuplot versus matlab plot: a suggestion |
Date: |
Tue, 17 Jul 2007 07:19:27 -0700 (PDT) |
User-agent: |
SquirrelMail/1.4.9a |
Hello,
if you are interested, I wrote an octave-gnuplot interface that simplifies
(imho) the task of saving data and writing gnuplot scripts from octave.
It is far from perfect, but works well enough for the plots I needed to do in
the past months.
Hth,
Etienne
================================================================================
g = g_new ( ...) - Create a new gnuplot_object and its directory
The g_XYZ() functions allow Octave to create plots with Gnuplot. They
are little more than an Octave front-end to Gnuplot, but allow to do
anything Gnuplot can do directly from Octave. In addition, there are some
commodity functions (g_cmd() with struct arg, g_locate()) that allow to nest
one figure in another.
g_new() creates a temporary directory in which data and commands will be
stored in a gnuplot-readable format.
g_new accepts key, value pairs of arguments, which will be passed to g_set.
Typical usage:
g = g_new (<my options, e.g. on how to display>)
g = g_data (g, "myChosenDataFileName", data, ...)
g = g_cmd (g, <gnuplot commands, e.g.>,\
"plot 'myChosenDataFileName' with lines",...);
g_plot (g,<options on how to plot, e.g. to file>);
DEMO: Run g_demo(), or see http://gnuplot.sourceforge.net/demo_4.1 on how to
do nice plots.
SEE ALSO: g_ez, g_delete, g_data, g_cmd, g_plot, g_set, g_locate.
TODO: an OO style of function call (see failed attempt at end of g_new code)
================================================================================
On Sat, July 14, 2007 04:22, address@hidden wrote:
# Hi, I have a question and a suggestion.
# Question: in the loop bellow, how can i plot with different point styles?
#
# for k=1:5
# plot(k, k.^k) # monochrome, with points
# endfor
#
# I want the first loop be plotted as '+', the 2nd as '*', the 3rd as balls etc.
#
# Suggestion: i like gnuplot style, and i think that octave's trend to adopt
# matlab plotting style is nice, but excluding gnuplot style from octave
# will also unmotivate people to learn "gnuplots language", and a
# co-existence of both in octave would not be harmfull.
# I suggets that one can open gnuplot inside octave, loading
# automatically octave variables to easily plot. This would not
# need much programming work, and would help keeping gnuplot
# language alive, and give the option for octave users.
# Is it a silly suggestion?
# I think this command __gnuplot_plot__ is not doing exactly that, is it?
# _______________________________________________
# Help-octave mailing list
# address@hidden
# https://www.cae.wisc.edu/mailman/listinfo/help-octave
#
--
http://www.isr.ist.utl.pt/~etienne
Re: gnuplot versus matlab plot: a suggestion,
etienne <=