 # Custom y-axis

Hello,

my matter is a bit difficult to explain for me, I hope you get the picture.

I want to (line) plot pressure and temperatur at different stations in an aircraft engine. The stations are labeled like 0, 1, 2, 22, 23, 3, ... (order is like that). Stations are on the y-axis and should be plotted equidistant. Two x-axisis are temperatur/pressure.

T
^ x

x
x
x
x
x

o- - - - - - - - - - - -> station
0 1 2 22 23 3

(given an linear increase in temperatur)

My plot would be correct with:

plot([1,2,3], [300,350,700]) but the y-axis should have my custom label.

How can I do that?

Thanks,

Florian

You can just use custom tick-labels. Here is a simple example:

locs, labels = yticks([1,2,3,4,5,6],[‘150’, ‘300’, ‘600’, ‘1200’, ‘1800’])

setp(labels, ‘rotation’, ‘horizontal’)
yticklabels = getp(gca(), ‘yticklabels’)

···

On Tue, Apr 6, 2010 at 12:29 PM, Florian Lindner <mailinglists@…606…> wrote:

Hello,

my matter is a bit difficult to explain for me, I hope you get the picture.

I want to (line) plot pressure and temperatur at different stations in an aircraft engine. The stations are labeled like 0, 1, 2, 22, 23, 3, … (order is like that). Stations are on the y-axis and should be plotted equidistant. Two x-axisis are temperatur/pressure.

T

^ x

``````           x
``````
``````       x
``````
``````   x
``````

x

x

o- - - - - - - - - - - -> station

0 1 2 22 23 3

(given an linear increase in temperatur)

My plot would be correct with:

plot([1,2,3], [300,350,700]) but the y-axis should have my custom label.

How can I do that?

Thanks,

Florian

Gökhan