On Tue, Apr 6, 2010 at 12:29 PM, Florian Lindner <mailingli...@xgm.de>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
>

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')

-- 
Gökhan
------------------------------------------------------------------------------
Download Intel&#174; Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
_______________________________________________
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users

Reply via email to