-
Notifications
You must be signed in to change notification settings - Fork 98
Open
Labels
Description
Description
I wanted to plot a contour map in a geographic projection, and the plotting went just fine. However, when I tried to add labels to contours, the results were quite confusing.
Steps to reproduce
A "Minimal, Complete and Verifiable Example" will make it much easier for maintainers to help you.
# your code here
# we should be able to copy-paste this into python and exactly reproduce your bug
import proplot as pplt
import pandas as pd
import numpy as np
state = np.random.RandomState(51423)
data = state.rand(6, 6)
data = pd.DataFrame(data, index=pd.Index(['a', 'b', 'c', 'd', 'e', 'f']))
lat = np.linspace(40, 5, 6)
lon = np.linspace(90, 135, 6)
fig = pplt.figure(
refwidth = 4.5,
)
ax = fig.subplots(
proj = 'cyl',
)
ax.contour(
lon,
lat,
data,
labels = True,
)
ax.format(
lonlim = (90, 135),
latlim = (5, 40),
lonlines = 15,
latlines = 10,
lonlabels = 'b',
latlabels = 'l',
)