help-octave
[Top][All Lists]
Advanced

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

Text labels on plot axis?


From: Matthias Brennwald
Subject: Text labels on plot axis?
Date: Fri, 16 Mar 2007 09:44:28 +0100 (CET)
User-agent: SquirrelMail/1.4.4

Dear all

is there a way to put text labels on a plot axis instead of numbers?

A little background: I've got some data on different chemical elements,
and I want to compare the data in a plot. I'd like to use the x-axis for
the different elements (with the element names as labels on the x-axis)
and the values on the y-axis.

For instance:

el = [ H ; Be ; C ; Ca ]; % element names
x  = [ 1 ; 2 ; 3 ; 4 ]; % dummy x-coordinates
y  = [0.1 ; 0.2 ; 0.15 ; 0.22]; % y-coordinats, values

plot(x,y); % this will give 1, 2, 3, and 4 on the x axis.

--> replace 1, 2 , 3, and 4 with the element names in el?

I'm pretty sure this can be done with gnuplot, so it should be possible to
do it from within Octave using gset or __gnuplot_raw__ (although these
commands will not be supported in the future). Any suggestions?

Matthias




reply via email to

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