0

I am currently working with Matplotlib. I am plotting some data successfully, but I want to change x and y category labels axis position because they are overlapping with x and y labels. Any suggestions? enter image description here

Thanks in advance!

fig = pl.figure(figsize=(10, 8))
_, cf = wrl.vis.plot_ppi(data, fig=fig, cg=True, vmin=vmin, vmax=vmax)

pl.xlabel("Easting from radar (km)", labelpad = 30)
pl.ylabel("Northing from radar (km)", labelpad = 30)
pl.title(title)

cb = pl.colorbar(cf, shrink=1)
cb.set_label("dBZ")

pl.xlim(-km, km)  # limits of the plot in KM
pl.ylim(-km, km)  # limits of the plot in KM
pl.grid(color="grey")
  • Could you perhaps provide an image to illustrate what you want? You can change the position of the legend and separate labels, see the documentation of matplotlib.pyplot. https://matplotlib.org/3.1.0/api/_as_gen/matplotlib.pyplot.legend.html – sander May 07 '20 at 15:03
  • Hi Sandertjuhh, I provided an image to show what my problem is. Sure it is easier to understand what I want to do. Thanks for your answer! – Azucena Jiménez Castañeda May 07 '20 at 15:55
  • Is the labelpad you've set not working? – sander May 07 '20 at 16:00
  • Unfortunately, it's not working. I tried changing the values to see how they perform, but nothing happened to the plot. – Azucena Jiménez Castañeda May 07 '20 at 16:04
  • Have you tried the solutions in https://stackoverflow.com/questions/55268688/shifting-all-label-values-far-from-axis/55268960? – sander May 07 '20 at 16:08

0 Answers0