-
Notifications
You must be signed in to change notification settings - Fork 98
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
2D Segment and Text Scatterplot types #407
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks really cool! LGTM -- I've left a few nitpicks, but nothing major.
chaco/segment_plot.py
Outdated
def _render_orthogonal(self, gc, starts, ends, colors, widths): | ||
""" Render orthogonal lines connecting the start point and end point. | ||
|
||
Draw the orthogonal line in the direction determined by |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Missing sentence part.
chaco/segment_plot.py
Outdated
def _render_quad(self, gc, starts, ends, colors, widths): | ||
""" Render quadratic Bezier curves connecting the start and end points. | ||
|
||
Draw the orthogonal line in the direction determined by |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
here too
chaco/segment_plot.py
Outdated
def _render_cubic(self, gc, starts, ends, colors, widths): | ||
""" Render quadratic Bezier curves connecting the start and end points. | ||
|
||
Draw the orthogonal line in the direction determined by |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
and here :)
|
||
def test_segment(self): | ||
self.assertEqual(self.segment_plot.origin, 'bottom left') | ||
self.assertEqual( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could this be a self.assertIs
?
temp_plot.x_grid = None | ||
temp_plot.x_axis = None | ||
temp_plot.y_axis.orientation = 'right' | ||
temp_plot.y_axis.title = u'Temp (°C)' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I was looking at this on Wikipedia (https://en.wikipedia.org/wiki/French_invasion_of_Russia#/media/File:Minard.png), and it looks like the temperature may be in degrees Reaumur.
LGTM (x2) -- can't wait to use this! |
I got a bit bored on a long weekend.
This PR adds a general segment plot, which is a collection of (disconnected) line segments specified by start and end points. Segments can be mapped by width and color as well as position.
Also added a plot which draws text at specified x and y locations, similar to the 1d text plot that already exists.