Learn how easy it is to sync an existing GitHub or Google Code repo to a SourceForge project!

## matplotlib-users

 [Matplotlib-users] Custom y-axis From: Florian Lindner - 2010-04-06 17:46:03 ```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 ```
 Re: [Matplotlib-users] Custom y-axis From: Gökhan Sever - 2010-04-06 17:54:11 Attachments: Message as HTML ```On Tue, Apr 6, 2010 at 12:29 PM, Florian Lindner 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 ```