Marker/scatter reconciliation #400

Merged
merged 9 commits into from Jul 25, 2011

Projects

None yet

4 participants

Owner
mdboom commented Jul 15, 2011

The set of available Line2D markers and scatter markers has always been slightly different. Some features (such as mathtext markers) were only available in one place and not the other. This refactors everything into a new markers.py module which is used from everywhere else to keep the functionality consistent and equally capable everywhere.

This seems to pass all regression tests and doesn't change any relevant examples, but it's pretty core functionality, so care should be taken it doesn't break anything.

Owner
mdboom commented Jul 15, 2011

Addresses bugs #350, #125

@efiring efiring commented on an outdated diff Jul 18, 2011
@@ -1,3 +1,12 @@
+2001-07-15 The set of markers available in the plot() and scatter()
@efiring efiring commented on the diff Jul 18, 2011
src/_backend_agg.cpp
path.total_vertices(),
- 1.0);
+ 0.0);
efiring
efiring Jul 18, 2011 Owner

Mike, I'm curious: what is the effect of the two changes here?

mdboom
mdboom Jul 18, 2011 Owner

This makes the markers more accurately align over the line drawn underneath.

@mdboom mdboom merged commit fafc0cf into matplotlib:master Jul 25, 2011

The change to degrees was not intentional. @jdh2358, @efiring: What do you guys think? Do you think the angle of the scatter marker should stay in radians (as it always was)?

Personally, in general I would be in favour of using degrees throughout. There are a couple of reasons for this:

  • Easier to work with for less mathematically minded
  • Quicker to type for the more mathematically minded. i.e. np.pi/2 vs 90
  • Degrees suffers less with floating point precision issues (this is a bit of a moot point)
@mdboom mdboom deleted the mdboom:marker_scatter_reconcile branch Mar 3, 2015
@QuLogic QuLogic added this to the v1.1.0 milestone Nov 4, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment