2D Segment and Text Scatterplot types#407
Merged
Merged
Conversation
jvkersch
approved these changes
May 18, 2019
Contributor
jvkersch
left a comment
There was a problem hiding this comment.
This looks really cool! LGTM -- I've left a few nitpicks, but nothing major.
| 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 |
| 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 |
| 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 |
|
|
||
| def test_segment(self): | ||
| self.assertEqual(self.segment_plot.origin, 'bottom left') | ||
| self.assertEqual( |
Contributor
There was a problem hiding this comment.
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)' |
Contributor
There was a problem hiding this comment.
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.
Contributor
|
LGTM (x2) -- can't wait to use this! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.