From: Sergi Pons Freixes <sponsfreixes@gm...>  20110526 15:44:28

Hi All, I have a pcolor plot with 101 rows, and I was using this: ... ODEPTH = np.linspace(0, 10, 101) ... odepthl = [str(x) for x in ODEPTH] ax.yaxis.set_ticks(np.arange(ODEPTH.size)+0.5) ax.yaxis.set_ticklabels(odepthl) ... To set the ticks centered on each row. Now I'm interested on having the ticks on fewer locations, for example on integers. I tried: ... ODEPTH = np.linspace(0, 10, 101) ... odepthax = np.linspace(0, 10, 11) odepthl = [str(x) for x in odepthax] ax.yaxis.set_ticks(np.arange(odepthax.size)+0.5) ax.yaxis.set_ticklabels(odepthl) ... But I'm only getting the desired labels (integers from 0 to 10), but the location is the one from the ten previous ticks (from 0 to 1, spaced by 0.1). I've been googling, reviewing the doc and playing with it, but I cannot achieve it. Any clue? Regards, Sergi 