x axis labeling disappears when using twinx()
See original GitHub issueCode sample, a copy-pastable example if possible
A “Minimal, Complete and Verifiable Example” will make it much easier for maintainers to help you.
import proplot as plot
import numpy as np
import xarray as xr
times = np.arange(1990, 2000)
data = xr.DataArray(np.random.rand(len(times)), dims=['time'], coords=[times])
f, ax = plot.subplots(aspect=2)
ax.plot(data.time, data)
twinax = ax.twinx()
# twinax.format(xlocator=1)
ax.format(xticks=np.arange(1990, 2000, 2))
Actual result vs. expected result
Using twinx()
, the tick labeling disappears on the twin axis. This happens for datetime and normal numbers. Using xticks
/xlocator
on the main axis or twinax
instance changes the ticks but does not produce labels.
Issue Analytics
- State:
- Created 4 years ago
- Comments:11
Top Results From Across the Web
x axis labeling disappears when using twinx() #127 - GitHub
Using twinx() , the tick labeling disappears on the twin axis. This happens for datetime and normal numbers. Using xticks / xlocator on...
Read more >Twinx makes labels disappear - python - Stack Overflow
You will need to set the labels for X-axis using the set_xticklabels() to show the fields. Add this line after plotting the graph....
Read more >matplotlib.axes.Axes.twinx — Matplotlib 3.6.2 documentation
The x-axis autoscale setting will be inherited from the original Axes. To ensure that the tick marks of both y-axes align, see LinearLocator...
Read more >x-ticks disappear when plotting on subplots sharing x-axis ...
This happens when I try to plot a line and an area on the same subplot. I found the my x-ticks disappear after...
Read more >Chart labels on y axis are missing - Microsoft Support
Chart labels on y axis are missing. Not all of them are displayed. Some of them are skipped. Sometimes even Expand Chart will...
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
My bad! I see now, this definitely is a major problem. I will address this before the end of the weekend. Thanks for the additional examples.
Works well. Thank Luke!