Relative Content

Tag Archive for matplotlib

How to avoid the “exceeds Locator.MAXTICKS” error?

The following complete code tries to plot some data with the x axis to show a time in the format HH:MM, and the time span is not even 1 minute. So I expect to see maybe the ticks 11:56, 11:57 and 11:58. But it seems 3 ticks are too much?

Placing text next to axvline

I need to mark certain values in a plot without changing axes limits, e.g., I want a vertical line at x=pi/2 to mark the max(cos(x)) but I don’t want to figure out the appropriate y limits and I just want my vertical line to go from 33% to 67% of the axes. So, as per vertical & horizontal lines in matplotlib, I am using axvline.

Matplotlib.scatter documentation covers some parameters unclearly

I was searching for how to plot a scatter plot with points that have a transparent face but coloured edges. This page gave some ideas, but I find the behaviour of some arguments to differ than reported there. For example, one answer describes argument c as affecting both face color and edge color, causing arguments for the latter two to be ignored. In contrast I found the following to be synonymous: c, color, facecolor, facecolors.