Cartopy fails to correctly contour data on rotated gridContouring with cartopy: ValueError: invalid transform: Spherical contouring is not supportedPlotting Natural Earth features on a custom projectionPlot Polar Gridded Sea Ice Concentrations using CartopyPlotting rotated pole projection in cartopyContour data with cartopyPython 3.4 crashes when producing some – but not all – Cartopy maps with segmentation fault 11Cartopy plotting issue for interval dataInterpolation Methods for Contours Plotted in CartoPyHow to plot contours from a polar stereographic grib2 file in PythonWhy is checking if a geopoint is on land failing in cartopy?
Efficient way to transport a Stargate
How does it work when somebody invests in my business?
Unreliable Magic - Is it worth it?
Can the discrete variable be a negative number?
Short story about space worker geeks who zone out by 'listening' to radiation from stars
How do scammers retract money, while you can’t?
Applicability of Single Responsibility Principle
Shortcut for value of this indefinite integral?
Where does the Z80 processor start executing from?
How do I extract a value from a time formatted value in excel?
Opposite of a diet
Term for the "extreme-extension" version of a straw man fallacy?
Increase performance creating Mandelbrot set in python
Is HostGator storing my password in plaintext?
Did Dumbledore lie to Harry about how long he had James Potter's invisibility cloak when he was examining it? If so, why?
Why escape if the_content isnt?
Hostile work environment after whistle-blowing on coworker and our boss. What do I do?
A Rare Riley Riddle
Energy of the particles in the particle accelerator
What is the difference between "behavior" and "behaviour"?
How to be diplomatic in refusing to write code that breaches the privacy of our users
Class Action - which options I have?
Is oxalic acid dihydrate considered a primary acid standard in analytical chemistry?
Roman Numeral Treatment of Suspensions
Cartopy fails to correctly contour data on rotated grid
Contouring with cartopy: ValueError: invalid transform: Spherical contouring is not supportedPlotting Natural Earth features on a custom projectionPlot Polar Gridded Sea Ice Concentrations using CartopyPlotting rotated pole projection in cartopyContour data with cartopyPython 3.4 crashes when producing some – but not all – Cartopy maps with segmentation fault 11Cartopy plotting issue for interval dataInterpolation Methods for Contours Plotted in CartoPyHow to plot contours from a polar stereographic grib2 file in PythonWhy is checking if a geopoint is on land failing in cartopy?
when contouring a dataset that is defined on a rotated pole grid, I get the following result:
This is only a problem when using contour
and contourf
, not pcolormesh
.
Anyone have any idea what could be going on here? Should I file a bug report, and if yes, should I do so with cartopy or with matplotlib?
Reproducing
- example notebook https://github.com/lvankampenhout/stackoverflow-rotatedpole/blob/master/Minimum%20example.ipynb
- example data http://www.staff.science.uu.nl/~kampe004/files/snow_rlat_rlon.nc
cartopy
add a comment |
when contouring a dataset that is defined on a rotated pole grid, I get the following result:
This is only a problem when using contour
and contourf
, not pcolormesh
.
Anyone have any idea what could be going on here? Should I file a bug report, and if yes, should I do so with cartopy or with matplotlib?
Reproducing
- example notebook https://github.com/lvankampenhout/stackoverflow-rotatedpole/blob/master/Minimum%20example.ipynb
- example data http://www.staff.science.uu.nl/~kampe004/files/snow_rlat_rlon.nc
cartopy
add a comment |
when contouring a dataset that is defined on a rotated pole grid, I get the following result:
This is only a problem when using contour
and contourf
, not pcolormesh
.
Anyone have any idea what could be going on here? Should I file a bug report, and if yes, should I do so with cartopy or with matplotlib?
Reproducing
- example notebook https://github.com/lvankampenhout/stackoverflow-rotatedpole/blob/master/Minimum%20example.ipynb
- example data http://www.staff.science.uu.nl/~kampe004/files/snow_rlat_rlon.nc
cartopy
when contouring a dataset that is defined on a rotated pole grid, I get the following result:
This is only a problem when using contour
and contourf
, not pcolormesh
.
Anyone have any idea what could be going on here? Should I file a bug report, and if yes, should I do so with cartopy or with matplotlib?
Reproducing
- example notebook https://github.com/lvankampenhout/stackoverflow-rotatedpole/blob/master/Minimum%20example.ipynb
- example data http://www.staff.science.uu.nl/~kampe004/files/snow_rlat_rlon.nc
cartopy
cartopy
asked Mar 8 at 11:34
Leo van KampenhoutLeo van Kampenhout
195
195
add a comment |
add a comment |
1 Answer
1
active
oldest
votes
Data for contouring should be split into 2 parts to avoid errors you found. I choose longitude=0
as the dividing line. Numpy's masked array technique is used to achieve the data manipulation. Here is the working code that produces a useful plot.
import numpy as np
import cartopy.crs as ccrs
import matplotlib as mpl
import matplotlib.colors as colors
import matplotlib.pyplot as plt
import numpy.ma as ma
from netCDF4 import Dataset
nc = Dataset('./data/snow_rlat_rlon.nc')
# Prep values for contouring
snow_2d_array = nc.variables[u'snowfall'][:] # need *(86400*365); mm/s-> mm/yr
lat_2d_array = nc.variables[u'lat2d'][:]
lon_2d_array = nc.variables[u'lon2d'][:]
# do masked-array on the lon_2d
lon2d_greater = ma.masked_greater(lon_2d_array, -0.01)
lon2d_lesser = ma.masked_less(lon_2d_array, 0)
# apply masks to other associate arrays: lat_2d
lat2d_greater = ma.MaskedArray(lat_2d_array, mask=lon2d_greater.mask)
lat2d_lesser = ma.MaskedArray(lat_2d_array, mask=lon2d_lesser.mask)
# apply masks to other associate arrays: snow_2d
snow_2d_greater = ma.MaskedArray(snow_2d_array, mask=lon2d_greater.mask)
snow_2d_lesser = ma.MaskedArray(snow_2d_array, mask=lon2d_lesser.mask)
# set levels for contouring of snow_2d
levels = (0, 25, 50, 75, 100, 200, 400, 600, 800, 1000, 2000, 4000)
# get snow_2d value-limits for use with colormap
vmax, vmin = snow_2d_array.max()*86400*365, snow_2d_array.min()*86400*365
cmap1 = "viridis"
norm1 = colors.BoundaryNorm(boundaries=levels, ncolors=16)
norm2 = colors.Normalize(vmin=vmin, vmax=vmax/4)
# setup fig+axes, specifying projection to use
fig, ax = plt.subplots(subplot_kw='projection': ccrs.SouthPolarStereo())
fig.set_size_inches([10, 10])
ax.coastlines(color="red", linewidth=2) # draw coastlines in red
# plot contour using each part of the 2 masked data sets
ct1 = ax.contour(lon2d_greater, lat2d_greater, snow_2d_greater*86400*365,
norm=norm2, levels=levels,
transform=ccrs.PlateCarree())
ct2 = ax.contour(lon2d_lesser, lat2d_lesser, snow_2d_lesser*86400*365,
norm=norm2, levels=levels,
transform=ccrs.PlateCarree())
#plt.colorbar(ct1, shrink=0.85)
plt.show()
The output plot:
For filled-contour, replace ax.contour()
with ax.contourf()
and add:
ax.set_xlim((-4052327.4304452268, 4024164.250636036))
in front of plt.show()
.
Hope it is useful to your project.
Thanks a lot for this workaround! Hadn't thought of that. However, IMHO this still doesn't fully answer the question whether the default behaviour (giving the ugly plot) should be considered a bug or not. Could you comment on that?
– Leo van Kampenhout
Mar 11 at 12:50
1
@LeovanKampenhout : I would consider it a bug on Cartopy side. If you look atcartopy
source code, scitools.org.uk/cartopy/docs/v0.5/_modules/cartopy/mpl/…, forgeoaxes
class (subclassing from matplotlib's axes, a cartesian system), its methodscontour()
andcontourf()
have additional coordinate transformation process only. No specific treatment of geospatial coordinates requirements.
– swatchai
Mar 11 at 14:24
add a comment |
Your Answer
StackExchange.ifUsing("editor", function ()
StackExchange.using("externalEditor", function ()
StackExchange.using("snippets", function ()
StackExchange.snippets.init();
);
);
, "code-snippets");
StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "1"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);
else
createEditor();
);
function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);
);
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55062406%2fcartopy-fails-to-correctly-contour-data-on-rotated-grid%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
Data for contouring should be split into 2 parts to avoid errors you found. I choose longitude=0
as the dividing line. Numpy's masked array technique is used to achieve the data manipulation. Here is the working code that produces a useful plot.
import numpy as np
import cartopy.crs as ccrs
import matplotlib as mpl
import matplotlib.colors as colors
import matplotlib.pyplot as plt
import numpy.ma as ma
from netCDF4 import Dataset
nc = Dataset('./data/snow_rlat_rlon.nc')
# Prep values for contouring
snow_2d_array = nc.variables[u'snowfall'][:] # need *(86400*365); mm/s-> mm/yr
lat_2d_array = nc.variables[u'lat2d'][:]
lon_2d_array = nc.variables[u'lon2d'][:]
# do masked-array on the lon_2d
lon2d_greater = ma.masked_greater(lon_2d_array, -0.01)
lon2d_lesser = ma.masked_less(lon_2d_array, 0)
# apply masks to other associate arrays: lat_2d
lat2d_greater = ma.MaskedArray(lat_2d_array, mask=lon2d_greater.mask)
lat2d_lesser = ma.MaskedArray(lat_2d_array, mask=lon2d_lesser.mask)
# apply masks to other associate arrays: snow_2d
snow_2d_greater = ma.MaskedArray(snow_2d_array, mask=lon2d_greater.mask)
snow_2d_lesser = ma.MaskedArray(snow_2d_array, mask=lon2d_lesser.mask)
# set levels for contouring of snow_2d
levels = (0, 25, 50, 75, 100, 200, 400, 600, 800, 1000, 2000, 4000)
# get snow_2d value-limits for use with colormap
vmax, vmin = snow_2d_array.max()*86400*365, snow_2d_array.min()*86400*365
cmap1 = "viridis"
norm1 = colors.BoundaryNorm(boundaries=levels, ncolors=16)
norm2 = colors.Normalize(vmin=vmin, vmax=vmax/4)
# setup fig+axes, specifying projection to use
fig, ax = plt.subplots(subplot_kw='projection': ccrs.SouthPolarStereo())
fig.set_size_inches([10, 10])
ax.coastlines(color="red", linewidth=2) # draw coastlines in red
# plot contour using each part of the 2 masked data sets
ct1 = ax.contour(lon2d_greater, lat2d_greater, snow_2d_greater*86400*365,
norm=norm2, levels=levels,
transform=ccrs.PlateCarree())
ct2 = ax.contour(lon2d_lesser, lat2d_lesser, snow_2d_lesser*86400*365,
norm=norm2, levels=levels,
transform=ccrs.PlateCarree())
#plt.colorbar(ct1, shrink=0.85)
plt.show()
The output plot:
For filled-contour, replace ax.contour()
with ax.contourf()
and add:
ax.set_xlim((-4052327.4304452268, 4024164.250636036))
in front of plt.show()
.
Hope it is useful to your project.
Thanks a lot for this workaround! Hadn't thought of that. However, IMHO this still doesn't fully answer the question whether the default behaviour (giving the ugly plot) should be considered a bug or not. Could you comment on that?
– Leo van Kampenhout
Mar 11 at 12:50
1
@LeovanKampenhout : I would consider it a bug on Cartopy side. If you look atcartopy
source code, scitools.org.uk/cartopy/docs/v0.5/_modules/cartopy/mpl/…, forgeoaxes
class (subclassing from matplotlib's axes, a cartesian system), its methodscontour()
andcontourf()
have additional coordinate transformation process only. No specific treatment of geospatial coordinates requirements.
– swatchai
Mar 11 at 14:24
add a comment |
Data for contouring should be split into 2 parts to avoid errors you found. I choose longitude=0
as the dividing line. Numpy's masked array technique is used to achieve the data manipulation. Here is the working code that produces a useful plot.
import numpy as np
import cartopy.crs as ccrs
import matplotlib as mpl
import matplotlib.colors as colors
import matplotlib.pyplot as plt
import numpy.ma as ma
from netCDF4 import Dataset
nc = Dataset('./data/snow_rlat_rlon.nc')
# Prep values for contouring
snow_2d_array = nc.variables[u'snowfall'][:] # need *(86400*365); mm/s-> mm/yr
lat_2d_array = nc.variables[u'lat2d'][:]
lon_2d_array = nc.variables[u'lon2d'][:]
# do masked-array on the lon_2d
lon2d_greater = ma.masked_greater(lon_2d_array, -0.01)
lon2d_lesser = ma.masked_less(lon_2d_array, 0)
# apply masks to other associate arrays: lat_2d
lat2d_greater = ma.MaskedArray(lat_2d_array, mask=lon2d_greater.mask)
lat2d_lesser = ma.MaskedArray(lat_2d_array, mask=lon2d_lesser.mask)
# apply masks to other associate arrays: snow_2d
snow_2d_greater = ma.MaskedArray(snow_2d_array, mask=lon2d_greater.mask)
snow_2d_lesser = ma.MaskedArray(snow_2d_array, mask=lon2d_lesser.mask)
# set levels for contouring of snow_2d
levels = (0, 25, 50, 75, 100, 200, 400, 600, 800, 1000, 2000, 4000)
# get snow_2d value-limits for use with colormap
vmax, vmin = snow_2d_array.max()*86400*365, snow_2d_array.min()*86400*365
cmap1 = "viridis"
norm1 = colors.BoundaryNorm(boundaries=levels, ncolors=16)
norm2 = colors.Normalize(vmin=vmin, vmax=vmax/4)
# setup fig+axes, specifying projection to use
fig, ax = plt.subplots(subplot_kw='projection': ccrs.SouthPolarStereo())
fig.set_size_inches([10, 10])
ax.coastlines(color="red", linewidth=2) # draw coastlines in red
# plot contour using each part of the 2 masked data sets
ct1 = ax.contour(lon2d_greater, lat2d_greater, snow_2d_greater*86400*365,
norm=norm2, levels=levels,
transform=ccrs.PlateCarree())
ct2 = ax.contour(lon2d_lesser, lat2d_lesser, snow_2d_lesser*86400*365,
norm=norm2, levels=levels,
transform=ccrs.PlateCarree())
#plt.colorbar(ct1, shrink=0.85)
plt.show()
The output plot:
For filled-contour, replace ax.contour()
with ax.contourf()
and add:
ax.set_xlim((-4052327.4304452268, 4024164.250636036))
in front of plt.show()
.
Hope it is useful to your project.
Thanks a lot for this workaround! Hadn't thought of that. However, IMHO this still doesn't fully answer the question whether the default behaviour (giving the ugly plot) should be considered a bug or not. Could you comment on that?
– Leo van Kampenhout
Mar 11 at 12:50
1
@LeovanKampenhout : I would consider it a bug on Cartopy side. If you look atcartopy
source code, scitools.org.uk/cartopy/docs/v0.5/_modules/cartopy/mpl/…, forgeoaxes
class (subclassing from matplotlib's axes, a cartesian system), its methodscontour()
andcontourf()
have additional coordinate transformation process only. No specific treatment of geospatial coordinates requirements.
– swatchai
Mar 11 at 14:24
add a comment |
Data for contouring should be split into 2 parts to avoid errors you found. I choose longitude=0
as the dividing line. Numpy's masked array technique is used to achieve the data manipulation. Here is the working code that produces a useful plot.
import numpy as np
import cartopy.crs as ccrs
import matplotlib as mpl
import matplotlib.colors as colors
import matplotlib.pyplot as plt
import numpy.ma as ma
from netCDF4 import Dataset
nc = Dataset('./data/snow_rlat_rlon.nc')
# Prep values for contouring
snow_2d_array = nc.variables[u'snowfall'][:] # need *(86400*365); mm/s-> mm/yr
lat_2d_array = nc.variables[u'lat2d'][:]
lon_2d_array = nc.variables[u'lon2d'][:]
# do masked-array on the lon_2d
lon2d_greater = ma.masked_greater(lon_2d_array, -0.01)
lon2d_lesser = ma.masked_less(lon_2d_array, 0)
# apply masks to other associate arrays: lat_2d
lat2d_greater = ma.MaskedArray(lat_2d_array, mask=lon2d_greater.mask)
lat2d_lesser = ma.MaskedArray(lat_2d_array, mask=lon2d_lesser.mask)
# apply masks to other associate arrays: snow_2d
snow_2d_greater = ma.MaskedArray(snow_2d_array, mask=lon2d_greater.mask)
snow_2d_lesser = ma.MaskedArray(snow_2d_array, mask=lon2d_lesser.mask)
# set levels for contouring of snow_2d
levels = (0, 25, 50, 75, 100, 200, 400, 600, 800, 1000, 2000, 4000)
# get snow_2d value-limits for use with colormap
vmax, vmin = snow_2d_array.max()*86400*365, snow_2d_array.min()*86400*365
cmap1 = "viridis"
norm1 = colors.BoundaryNorm(boundaries=levels, ncolors=16)
norm2 = colors.Normalize(vmin=vmin, vmax=vmax/4)
# setup fig+axes, specifying projection to use
fig, ax = plt.subplots(subplot_kw='projection': ccrs.SouthPolarStereo())
fig.set_size_inches([10, 10])
ax.coastlines(color="red", linewidth=2) # draw coastlines in red
# plot contour using each part of the 2 masked data sets
ct1 = ax.contour(lon2d_greater, lat2d_greater, snow_2d_greater*86400*365,
norm=norm2, levels=levels,
transform=ccrs.PlateCarree())
ct2 = ax.contour(lon2d_lesser, lat2d_lesser, snow_2d_lesser*86400*365,
norm=norm2, levels=levels,
transform=ccrs.PlateCarree())
#plt.colorbar(ct1, shrink=0.85)
plt.show()
The output plot:
For filled-contour, replace ax.contour()
with ax.contourf()
and add:
ax.set_xlim((-4052327.4304452268, 4024164.250636036))
in front of plt.show()
.
Hope it is useful to your project.
Data for contouring should be split into 2 parts to avoid errors you found. I choose longitude=0
as the dividing line. Numpy's masked array technique is used to achieve the data manipulation. Here is the working code that produces a useful plot.
import numpy as np
import cartopy.crs as ccrs
import matplotlib as mpl
import matplotlib.colors as colors
import matplotlib.pyplot as plt
import numpy.ma as ma
from netCDF4 import Dataset
nc = Dataset('./data/snow_rlat_rlon.nc')
# Prep values for contouring
snow_2d_array = nc.variables[u'snowfall'][:] # need *(86400*365); mm/s-> mm/yr
lat_2d_array = nc.variables[u'lat2d'][:]
lon_2d_array = nc.variables[u'lon2d'][:]
# do masked-array on the lon_2d
lon2d_greater = ma.masked_greater(lon_2d_array, -0.01)
lon2d_lesser = ma.masked_less(lon_2d_array, 0)
# apply masks to other associate arrays: lat_2d
lat2d_greater = ma.MaskedArray(lat_2d_array, mask=lon2d_greater.mask)
lat2d_lesser = ma.MaskedArray(lat_2d_array, mask=lon2d_lesser.mask)
# apply masks to other associate arrays: snow_2d
snow_2d_greater = ma.MaskedArray(snow_2d_array, mask=lon2d_greater.mask)
snow_2d_lesser = ma.MaskedArray(snow_2d_array, mask=lon2d_lesser.mask)
# set levels for contouring of snow_2d
levels = (0, 25, 50, 75, 100, 200, 400, 600, 800, 1000, 2000, 4000)
# get snow_2d value-limits for use with colormap
vmax, vmin = snow_2d_array.max()*86400*365, snow_2d_array.min()*86400*365
cmap1 = "viridis"
norm1 = colors.BoundaryNorm(boundaries=levels, ncolors=16)
norm2 = colors.Normalize(vmin=vmin, vmax=vmax/4)
# setup fig+axes, specifying projection to use
fig, ax = plt.subplots(subplot_kw='projection': ccrs.SouthPolarStereo())
fig.set_size_inches([10, 10])
ax.coastlines(color="red", linewidth=2) # draw coastlines in red
# plot contour using each part of the 2 masked data sets
ct1 = ax.contour(lon2d_greater, lat2d_greater, snow_2d_greater*86400*365,
norm=norm2, levels=levels,
transform=ccrs.PlateCarree())
ct2 = ax.contour(lon2d_lesser, lat2d_lesser, snow_2d_lesser*86400*365,
norm=norm2, levels=levels,
transform=ccrs.PlateCarree())
#plt.colorbar(ct1, shrink=0.85)
plt.show()
The output plot:
For filled-contour, replace ax.contour()
with ax.contourf()
and add:
ax.set_xlim((-4052327.4304452268, 4024164.250636036))
in front of plt.show()
.
Hope it is useful to your project.
edited Mar 10 at 15:49
answered Mar 10 at 15:28
swatchaiswatchai
3,66221627
3,66221627
Thanks a lot for this workaround! Hadn't thought of that. However, IMHO this still doesn't fully answer the question whether the default behaviour (giving the ugly plot) should be considered a bug or not. Could you comment on that?
– Leo van Kampenhout
Mar 11 at 12:50
1
@LeovanKampenhout : I would consider it a bug on Cartopy side. If you look atcartopy
source code, scitools.org.uk/cartopy/docs/v0.5/_modules/cartopy/mpl/…, forgeoaxes
class (subclassing from matplotlib's axes, a cartesian system), its methodscontour()
andcontourf()
have additional coordinate transformation process only. No specific treatment of geospatial coordinates requirements.
– swatchai
Mar 11 at 14:24
add a comment |
Thanks a lot for this workaround! Hadn't thought of that. However, IMHO this still doesn't fully answer the question whether the default behaviour (giving the ugly plot) should be considered a bug or not. Could you comment on that?
– Leo van Kampenhout
Mar 11 at 12:50
1
@LeovanKampenhout : I would consider it a bug on Cartopy side. If you look atcartopy
source code, scitools.org.uk/cartopy/docs/v0.5/_modules/cartopy/mpl/…, forgeoaxes
class (subclassing from matplotlib's axes, a cartesian system), its methodscontour()
andcontourf()
have additional coordinate transformation process only. No specific treatment of geospatial coordinates requirements.
– swatchai
Mar 11 at 14:24
Thanks a lot for this workaround! Hadn't thought of that. However, IMHO this still doesn't fully answer the question whether the default behaviour (giving the ugly plot) should be considered a bug or not. Could you comment on that?
– Leo van Kampenhout
Mar 11 at 12:50
Thanks a lot for this workaround! Hadn't thought of that. However, IMHO this still doesn't fully answer the question whether the default behaviour (giving the ugly plot) should be considered a bug or not. Could you comment on that?
– Leo van Kampenhout
Mar 11 at 12:50
1
1
@LeovanKampenhout : I would consider it a bug on Cartopy side. If you look at
cartopy
source code, scitools.org.uk/cartopy/docs/v0.5/_modules/cartopy/mpl/…, for geoaxes
class (subclassing from matplotlib's axes, a cartesian system), its methods contour()
and contourf()
have additional coordinate transformation process only. No specific treatment of geospatial coordinates requirements.– swatchai
Mar 11 at 14:24
@LeovanKampenhout : I would consider it a bug on Cartopy side. If you look at
cartopy
source code, scitools.org.uk/cartopy/docs/v0.5/_modules/cartopy/mpl/…, for geoaxes
class (subclassing from matplotlib's axes, a cartesian system), its methods contour()
and contourf()
have additional coordinate transformation process only. No specific treatment of geospatial coordinates requirements.– swatchai
Mar 11 at 14:24
add a comment |
Thanks for contributing an answer to Stack Overflow!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55062406%2fcartopy-fails-to-correctly-contour-data-on-rotated-grid%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown