Re: [Matplotlib-users] changing tick labels and tick positioning to account for origin

2009-07-28 Thread Matthias Michler
Hi, as nobody answered up to now I may make my (tiny) contribution. On Friday 24 July 2009 22:58:10 per freem wrote: Hi all, i have a simple scatter plot, where the x axis and y axis are on different scales starting from 0. the x axis here ranges from 0 to 300 and the y axis from 0 to 1. i

[Matplotlib-users] changing tick labels and tick positioning to account for origin

2009-07-24 Thread per freem
Hi all, i have a simple scatter plot, where the x axis and y axis are on different scales starting from 0. the x axis here ranges from 0 to 300 and the y axis from 0 to 1. i plot it as follows: my_fig = plt.figure(figsize=(6,5), dpi=100) x = rand(100)*300 y = rand(100) plt.scatter(x, y)

[Matplotlib-users] Changing tick labels

2007-08-05 Thread Tommy Grav
I am creating a 2 dimensional histogram that I would like to plot as a contourf plot with matplotlib. I am using numpy to generate the histogram, but when I plot it the tick marks are of course the index of the histogram array. How do I change these tick labels to the value of the bins used

Re: [Matplotlib-users] Changing tick labels

2007-08-05 Thread Eric Firing
Tommy, The easiest way is probably to provide contourf with x and y arguments corresponding to the bin centers. The x vector would have an entry for each column in your Z(x,y), and the y vector an entry for each row. In [1]:z = rand(10,20) In [2]:x = 2*arange(20) In [3]:y = 2*arange(10)