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

          Thal And Out Agency railway station See also References External links Navigation menuOfficial Web Site of Pakistan RailwaysArchivedOfficial Web Site of Pakistan Railwayseeexpanding ite

          Posting a File and Associated Data to a RESTful WebService preferably as JSON2019 Community Moderator ElectionREST URI convention - Singular or plural name of resource while creating itUploading both data and files in one form using Ajax?How do I upload a file with metadata using a REST web service?REST API - file (ie images) processing - best practicesSpring: JSON data and file in the same requestREST API Put large dataPosting a file and JSON data to Spring rest serviceRESTful Web Service Upload/Download Large Data With JSONREST API Design sending JSON data and a file to the api in same requestPost JSONArray to REST servicePUT vs. POST in RESTParsing values from a JSON file?JavaScript/jQuery to download file via POST with JSON dataHow do I upload a file with metadata using a REST web service?How to POST JSON data with Curl from Terminal/Commandline to Test Spring REST?Separate REST JSON API server and client?what's the correct way to send a file from REST web service to client?How do I write JSON data to a file?What is “406-Not Acceptable Response” in HTTP?REST API - file (ie images) processing - best practices

          How can I change the color of pagination dots of UIPageControl?How to change UIPageControl dotsIs there a way to change page indicator dots colorCustomize dot with image of UIPageControl at index 0 of UIPageControlNo visible @interface for 'NSObject<PageControlDelegate>' declares the selector 'pageControlPageDidChange:'How to change the color of pagination dots in UIPageControl with a different color per pagepagecontrol indicator custom image instead of DefaultChanging the colour of UIPageControl dots in MonoTouchpagecontrol selectable page visibility color?Alternative way to load ViewControllers on a UIPageControlHow to set only layer.border-color for UIpage control dots in swiftHow can I develop for iPhone using a Windows development machine?How to change the name of an iOS app?UITableView - change section header coloruipagecontrol indicator(dot)issueCustom UIPageControl dots color not changingchange the interspace between UIPageControl dotsHow to change Status Bar text color in iOSHow can I change image tintColor in iOS and WatchKitUIPageControl dots with larger space in between each dotsHow to change the color of pagination dots in UIPageControl with a different color per page