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?













0















when contouring a dataset that is defined on a rotated pole grid, I get the following result:



enter image description here



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









share|improve this question


























    0















    when contouring a dataset that is defined on a rotated pole grid, I get the following result:



    enter image description here



    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









    share|improve this question
























      0












      0








      0








      when contouring a dataset that is defined on a rotated pole grid, I get the following result:



      enter image description here



      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









      share|improve this question














      when contouring a dataset that is defined on a rotated pole grid, I get the following result:



      enter image description here



      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






      share|improve this question













      share|improve this question











      share|improve this question




      share|improve this question










      asked Mar 8 at 11:34









      Leo van KampenhoutLeo van Kampenhout

      195




      195






















          1 Answer
          1






          active

          oldest

          votes


















          1














          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:



          spole_plot



          For filled-contour, replace ax.contour() with ax.contourf() and add:



          ax.set_xlim((-4052327.4304452268, 4024164.250636036))


          in front of plt.show().



          contourf



          Hope it is useful to your project.






          share|improve this answer

























          • 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 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










          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
          );



          );













          draft saved

          draft discarded


















          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









          1














          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:



          spole_plot



          For filled-contour, replace ax.contour() with ax.contourf() and add:



          ax.set_xlim((-4052327.4304452268, 4024164.250636036))


          in front of plt.show().



          contourf



          Hope it is useful to your project.






          share|improve this answer

























          • 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 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















          1














          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:



          spole_plot



          For filled-contour, replace ax.contour() with ax.contourf() and add:



          ax.set_xlim((-4052327.4304452268, 4024164.250636036))


          in front of plt.show().



          contourf



          Hope it is useful to your project.






          share|improve this answer

























          • 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 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













          1












          1








          1







          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:



          spole_plot



          For filled-contour, replace ax.contour() with ax.contourf() and add:



          ax.set_xlim((-4052327.4304452268, 4024164.250636036))


          in front of plt.show().



          contourf



          Hope it is useful to your project.






          share|improve this answer















          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:



          spole_plot



          For filled-contour, replace ax.contour() with ax.contourf() and add:



          ax.set_xlim((-4052327.4304452268, 4024164.250636036))


          in front of plt.show().



          contourf



          Hope it is useful to your project.







          share|improve this answer














          share|improve this answer



          share|improve this answer








          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 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

















          • 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 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
















          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



















          draft saved

          draft discarded
















































          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.




          draft saved


          draft discarded














          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





















































          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







          Popular posts from this blog

          Identity Server 4 is not redirecting to Angular app after login2019 Community Moderator ElectionIdentity Server 4 and dockerIdentityserver implicit flow unauthorized_clientIdentityServer Hybrid Flow - Access Token is null after user successful loginIdentity Server to MVC client : Page Redirect After loginLogin with Steam OpenId(oidc-client-js)Identity Server 4+.NET Core 2.0 + IdentityIdentityServer4 post-login redirect not working in Edge browserCall to IdentityServer4 generates System.NullReferenceException: Object reference not set to an instance of an objectIdentityServer4 without HTTPS not workingHow to get Authorization code from identity server without login form

          2005 Ahvaz unrest Contents Background Causes Casualties Aftermath See also References Navigation menue"At Least 10 Are Killed by Bombs in Iran""Iran"Archived"Arab-Iranians in Iran to make April 15 'Day of Fury'"State of Mind, State of Order: Reactions to Ethnic Unrest in the Islamic Republic of Iran.10.1111/j.1754-9469.2008.00028.x"Iran hangs Arab separatists"Iran Overview from ArchivedConstitution of the Islamic Republic of Iran"Tehran puzzled by forged 'riots' letter""Iran and its minorities: Down in the second class""Iran: Handling Of Ahvaz Unrest Could End With Televised Confessions""Bombings Rock Iran Ahead of Election""Five die in Iran ethnic clashes""Iran: Need for restraint as anniversary of unrest in Khuzestan approaches"Archived"Iranian Sunni protesters killed in clashes with security forces"Archived

          Can't initialize raids on a new ASUS Prime B360M-A motherboard2019 Community Moderator ElectionSimilar to RAID config yet more like mirroring solution?Can't get motherboard serial numberWhy does the BIOS entry point start with a WBINVD instruction?UEFI performance Asus Maximus V Extreme