-
Notifications
You must be signed in to change notification settings - Fork 21
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
Adjust plotly x_label_height_factor #582
Conversation
a61838e
to
80bdd7e
Compare
Maybe I missed something in the code, but have you confirmed there's no problem with long names if there's only 4 or 5 labels? |
I took another look and reverted this behavior. I had not tested with the maximum length name, and it did still run off. |
Here are a couple of screenshots of the extremes here. Most Probabilistic forecasts will probably break the 15 character check to trigger this adjustment due to the arbiter-added suffixes. Including longest possible forecast name: @wholmgren anything else here? |
what!?!? known plotly bug? |
Updated to explicitly set a I think this is the best mix of reliable and decent looking for most cases we're going to get until there's an upstream solution. EXAMPLES: Length > 30 characters/ 45 degree labels Default behavior Names short enough that they can be printed horizontally, plot expands to fill the space. I did also try adding line breaks to long names, but this causes more overlap with lots of forecasts with or without angled labels. |
Co-authored-by: Will Holmgren <[email protected]>
docs/source/api.rst
for API changes.docs/source/whatsnew
for all changes. Includes link to the GitHub Issue with:issue:`num`
or this Pull Request with:pull:`num`
. Includes contributor name and/or GitHub username (link with:ghuser:`user`
).Adjusted the
X_LABEL_HEIGHT_FACTOR
to work with the longest possible forecast name: A forecast name containing 13 4 letter words separated by spaces, + the 'Prob(f <= x) = 100.0%' labelling added by the plotting code. I hit a few cases where Plotly tried to angle the x axis labels, which caused some labels to run off the right side of the plot. So I've forced the plot to display x axis labels vertically when there are more than 6 labels. .