Repository navigation
Allow pictures to be used as title and axis labels in plots - #65
Merged
Merged
Conversation
Updated the 2D and 3D plot procedures to accept a picture (from the pict
library) or a string as the label for the `#:title` and`#:{x,y,z}-label``
keywords, as well as the corresponing parameters, `plot-title` and
`plot-{x,y,z}-label`.
The original request was to allow LaTeX notation for the labels, this
changeset will enable doing that (and more) by installing the additional
`latex-pict` package and using the pictures produced by that package as
labels.
The folowing caveats apply for the implementation:
* the label position for the Y axis **is not** rotated when it is a picture,
only when it is a string. This was done to allow full flexibility to users
who chose to use pictures -- they can easily rotate the picture themselves.
If the picture would be rotated by the plot package, the user might have to
supply a rotated picture to have a horizontal picture for the y label, and
this would result in a double rotation -- depending on the type of graphics
used for the picture, this might create undesirable artifacts.
* the font used for axis labels and title determines the gap between the label
and the plot area and axis themselves.
A bug was fixed, where passing incorect parameters to plot procedure could
cause Racket to crash, an explanation for the fix is put as a comment in the
"plot-gui-lib/plot/private/gui/plot2d.rkt" file.
See also:
* racket#58
* racket/racket#3321
* racket#64
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.
Updated the 2D and 3D plot procedures to accept a picture (from the pict
library) or a string as the label for the
#:titleand#:{x,y,z}-labelkeywords, as well as the corresponing parameters,
plot-titleandplot-{x,y,z}-label.The original request was to allow LaTeX notation for the labels, this
changeset will enable doing that (and more) by installing the additional
latex-pictpackage and using the pictures produced by that package aslabels.
The folowing caveats apply for the implementation:
the label position for the Y axis is not rotated when it is a picture,
only when it is a string. This was done to allow full flexibility to users
who chose to use pictures -- they can easily rotate the picture themselves.
If the picture would be rotated by the plot package, the user might have to
supply a rotated picture to have a horizontal picture for the y label, and
this would result in a double rotation -- depending on the type of graphics
used for the picture, this might create undesirable artifacts.
the font used for axis labels and title determines the gap between the label
and the plot area and axis themselves.
A bug was fixed, where passing incorect parameters to plot procedure could
cause Racket to crash, an explanation for the fix is put as a comment in the
"plot-gui-lib/plot/private/gui/plot2d.rkt" file.
See also: