You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Please forgive me if this is already in the documentation, but is there a way to get the labels for bars on a discrete-histogram to be printed at an angle? If I have a plot with wide labels for the columns, the text gets smooshed.
One nice option would be to specify a pict to use for the bar label, but when I tried this all I got was #<pict> as the label.
Is there a way to do this? Or is this a feature that could be added?
plot-{x,y,z}-tick-label-angle can be used to change the angle of the labels, and plot-{x,y,z}-tick-label-anchor can be used to control where the label is connected to the "tick" on the plot. The plot documentation contains an example on how to use these.
Oh man… I did search for angle on the Racket docs, but I somehow had some context set that hid the results from me. I can see that now. Thank you for pointing me to that!
How hard would pict labels be? If that's something I wanted to add, could you give me a pointer to the source as to where to look?
How hard would pict labels be? If that's something I wanted to add, could you give me a pointer to the source as to where to look?
It would not be too difficult to add, the PR #65 contains the implementation for allowing pictures as axis labels and can be used as an example on what needs to be done. It also contains some links with related discussions from when that feature was implemented.
Activity
alex-hhh commentedon May 10, 2024
plot-{x,y,z}-tick-label-anglecan be used to change the angle of the labels, andplot-{x,y,z}-tick-label-anchorcan be used to control where the label is connected to the "tick" on the plot. The plot documentation contains an example on how to use these.https://docs.racket-lang.org/plot/params.html#%28def._%28%28lib._plot%2Fmain..rkt%29._plot-x-tick-label-angle%29%29
There is no support for
pictsas labels (yet)ashton314 commentedon May 11, 2024
Oh man… I did search for
angleon the Racket docs, but I somehow had some context set that hid the results from me. I can see that now. Thank you for pointing me to that!How hard would
pictlabels be? If that's something I wanted to add, could you give me a pointer to the source as to where to look?alex-hhh commentedon May 11, 2024
It would not be too difficult to add, the PR #65 contains the implementation for allowing pictures as axis labels and can be used as an example on what needs to be done. It also contains some links with related discussions from when that feature was implemented.