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 ------------------------------------------------------------------------------ vRanger cuts backup time in half-while increasing security. With the market-leading solution for virtual backup and recovery, you get blazing-fast, flexible, and affordable data protection. Download your free trial now. http://p.sf.net/sfu/quest-d2dcopy1 _______________________________________________ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users