-
Notifications
You must be signed in to change notification settings - Fork 301
Closed
Labels
Description
iplt.points() distorts the output when longitude coordinate is circular. The second plot below shows the correct behaviour by setting circular to false: cube.coord('longitude').circular = False
Also, the current API documentation suggests that points() requires a list of coords as arguments, but the current implementation expects a cube.
import iris.tests as tests
import iris
import iris.plot as iplt
import matplotlib.pyplot as plt
plt.switch_backend('tkagg')
pp_file = tests.get_data_path(('PP', 'globClim1', 'u_wind.pp'))
cube = iris.load(pp_file)[0][0]
plt.subplot(211)
iplt.pcolormesh(cube, vmax=50)
iplt.points(cube, s=cube.data)
plt.gca().coastlines()
ax1 = plt.gca()
plt.subplot(212)
cube.coord('longitude').circular = False
iplt.pcolormesh(cube, vmax=50)
iplt.points(cube, s=cube.data)
plt.gca().coastlines()
ax2 = plt.gca()
plt.show()
Reactions are currently unavailable
