Automargin clipping ticklabels
See original GitHub issueI’m trying to use *axis.automargin
to get the minimum necessary margin to display all tick labels/axis titles.
To do that I set layout.margin.[tblr]
to 0 and then set layout.[xy]axis.automargin
to true.
When I do this and do not have axis titles, the tick labels are slightly clipped. See this pen for an example: https://codepen.io/anon/pen/XPzEeN
When in the pen if you uncomment the line that sets layout.yaxis.title = ""
, you’ll notice that the ticks are no longer clipped.
Issue Analytics
- State:
- Created 5 years ago
- Comments:7 (5 by maintainers)
Top Results From Across the Web
Long tick labels getting cut off in plotly.js chart - Stack Overflow
Given the nature of my charts, I need to use a horizontal orientation. So a solution I can't use is a vertical orientation...
Read more >Long tick labels getting cut off in plotly.js chart
Hello ! You can play with the layout margin function to move the margin of the graph and correctly read your labels: Example....
Read more >matplotlib.pyplot.margins — Matplotlib 3.6.2 documentation
Rotating custom tick labels. On this page. margins(); Examples using matplotlib.pyplot.margins. © Copyright 2002–2012 John Hunter, Darren Dale, Eric Firing, ...
Read more >changelog - QCustomPlot
... (15 px) when auto margin is enabled - Added Flags type QCPAxis::AxisTypes ... beta: - Fixed bug that clipped the rightmost pixel...
Read more >plotly.js-geo-dist-min | Yarn - Package Manager
... namely support pseudo-html, fix textfont.color and avoid clipping [#5531] ... Fix axis automargin push offset which resulted in clipped tick labels in ......
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Ah there is it:
My bad. I’ll see If I can get a quick fix in for this thing. Thanks for reporting!
@etpinard Thanks for taking a look. I don’t think this will work for us though; it seems any
margin
smaller than the tick size will mean clipped ticks — see the x-axis ticks on https://codepen.io/anon/pen/GzrjxNI’ve tried the
layout.yaxis.title = ""
trick, which appears to work well for most graphs, but that’s not going to work for us with components that make use of plots flush with their container, such as the following (sorry for the lack of codepen)If
layout.yaxis.title = ""
hack really is the best solution for now I think I’ll do my best to work around the above issue with the flush-with-border plots.