-
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Fix for #7416: Hidden ticklabels with ticklabelposition "inside" take up plot space #7417
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
base: master
Are you sure you want to change the base?
Conversation
Hidden ticklabels don't take up space anymore.
…ke up space. Also use floating point comparison in "Test axes minor ticks"
Nice find and diagnosis @my-tien! I wonder though if there's a better way to do this - specifically, adding this whole extra loop at the end, in addition to being unnecessary vs. just doing the desired thing from the start, I worry it will cause those labels to be missing later like if you drag the axis around, either during or after the drag. Instead, I wonder if we can avoid this extra step by instead of plotly.js/src/plots/cartesian/axes.js Line 3654 in 8e2a5d7
and here: plotly.js/src/plots/cartesian/axes.js Lines 3712 to 3714 in 8e2a5d7
Because unlike |
Hey Alex, thanks a lot for taking the time! 👍 |
… mode to none. This is actually what we want: the label should not be visible and not take up space.
@alexcjohnson Pushed new implementation with |
Also remove left-over console debug print
In this PR the text of hidden ticklabels is removed so that they don't take up space anymore.
Before the fix (in upper subplot an invisible label "100" takes up space):
After the fix (the vertical grid lines in the subplots are aligned with each other as expected):
Disclaimer
I am required to add that…the software is provided "as is", without warranty of any kind, express or implied, including but not limited to the warranties of merchantability, fitness for a particular purpose and noninfringement. in no event shall the authors or copyright holders be liable for any claim, damages or other liability, whether in an action of contract, tort or otherwise, arising from, out of or in connection with the software or the use or other dealings in the software.