-
-
Notifications
You must be signed in to change notification settings - Fork 37
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
add plot-inset
and plot-legend-padding
parameters
#124
Conversation
... incomplete implementation
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.
Resyntax analyzed 1 file in this pull request and found no issues.
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.
Resyntax analyzed 1 file in this pull request and found no issues.
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.
Resyntax analyzed 1 file in this pull request and found no issues.
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.
Resyntax analyzed 1 file in this pull request and found no issues.
This pull request has been mentioned on Racket Discourse. There might be relevant details there: |
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.
Resyntax analyzed 1 file in this pull request and found no issues.
This PR introduces two new plot parameters,
plot-inset
andplot-legend-padding
, which control the amount of space left unused around the plot edge and plot legend. The motivation for this is using wider lines for the plot elements, these wider lines have an "end cap" which extends past the last pixel coordinate for the line, but, since the plot package attempts to maximize the plot area, it attempts to draw things like the axis ticks al the way to the edge.Here is an example of the problem. When using very thick lines, the top and right edge of the plot appears to be cut off, and the sample lines in the legend extend over the legend border -- the effect is present for thinner lines as well, but it is less noticeable, this example uses an extremely thick line to make the issue more apparent.
The
plot-inset
andplot-legend-padding
parameters allow the user to control the "empty" space, allowing for the line end caps to be drawn on the plot:NOTE: I considered updating the plot layout calculations to automatically add space for the line end caps, however this would be a backwards incompatible change, as it would change plot layouts in existing plot programs that people already have.