On 28 January 2016 at 19:49, Julian Irwin <[email protected]> wrote: > > > I am looking for a way to hide tick marks (not the labels!) that coincide > with axis lines. I think this is a problem for me because of the relative > line thicknesses of my axis lines and tick marks, but I want to leave those > thicknesses unchanged (I like the look of the thickness settings I am using > now).
Try this: from matplotlib import pyplot as plt fig = plt.figure() ax = fig.add_subplot(1, 1, 1) ax.plot([0, 1], [0, 1]) print(ax.get_xticks()) ax.set_xticks(ax.get_xticks()[1:-1]) # Remove first and last ticks print(ax.get_xticks()) -- Oscar ------------------------------------------------------------------------------ Site24x7 APM Insight: Get Deep Visibility into Application Performance APM + Mobile APM + RUM: Monitor 3 App instances at just $35/Month Monitor end-to-end web transactions and take corrective actions now Troubleshoot faster and improve end-user experience. Signup Now! http://pubads.g.doubleclick.net/gampad/clk?id=267308311&iu=/4140 _______________________________________________ Matplotlib-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/matplotlib-users