[Matplotlib-users] Slightly larger markers?

Skip Montanaro skip.montanaro at gmail.com
Sat Jan 7 07:01:21 EST 2017


Matplotlib seems to support two sizes of default markers, "much too
small" or "much too big." Nothing I tried from the table on this page

http://matplotlib.org/api/markers_api.html

was in the Goldilocks zone. :-)

This example:

http://matplotlib.org/examples/lines_bars_and_markers/marker_reference.html

suggests the "." marker should be more reasonably sized, but it's
still pretty darn big. By my crude estimates, the comma marker is a
single pixel, while the dot marker is a circle with diameter five
pixels. Am I missing something predefined which has a size in between
the comma and dot markers, maybe just a square marker with side length
two pixels?

I see that you can create custom markers. I suspect this will work
(though be a bit clunky). I'm not finding many examples, however, so
far just this marker_path example:

http://matplotlib.org/examples/pylab_examples/marker_path.html

The target is a command line plotting tool, so I'll probably have to
provide a way for users to map between marker characters and pickled
markers.

Thx,

Skip Montanaro


More information about the Matplotlib-users mailing list