Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • 06:20
    raybellwaves opened #1682
  • Nov 23 19:55
    Gwi7d31 commented #1291
  • Nov 23 19:54
    Gwi7d31 commented #1291
  • Nov 23 18:49
    karlwx commented #1291
  • Nov 23 17:34
    Gwi7d31 commented #1291
  • Nov 23 16:52
    karlwx commented #1291
  • Nov 23 16:50
    karlwx commented #1291
  • Nov 23 02:42
    Gwi7d31 commented #1291
  • Nov 23 02:42
    Gwi7d31 commented #1291
  • Nov 21 11:36
    graingert synchronize #1681
  • Nov 21 11:34
    graingert commented #1680
  • Nov 21 11:33
    graingert synchronize #1681
  • Nov 21 11:32
    graingert synchronize #1681
  • Nov 20 16:18
    SciTools-assistant unlabeled #1681
  • Nov 20 16:18
    graingert reopened #1681
  • Nov 20 16:18
    graingert closed #1681
  • Nov 20 16:17
    graingert synchronize #1681
  • Nov 20 16:15
    SciTools-assistant labeled #1681
  • Nov 20 16:15
    graingert opened #1681
  • Nov 19 20:30
    dopplershift commented #1552
winash12
@winash12
line_c = ax1.contour(lons, lats, ipvPlot, levels=[2], colors=['blue'], transform=ccrs.PlateCarree())
that's the line of code I added
Hakkeh4x0r
@Hakkeh4x0r
Hey everyone, i started a project adding some feature data to a geotiff i had, but now i'm stuck trying to adjust the padding in negative direction for gridline lat/lon annotation text. I need to adjust them over the image so i can minimize the figure size. I as well need to wrap the text in a white box. I have tried most of the hacks to adjust the position without actually modifying the cartopy code. Can anyone help me out?
grid_example.png
Hakkeh4x0r
@Hakkeh4x0r
@greglucas have any thoughts?
Greg
@greglucas
I think this is similar to this request: SciTools/cartopy#1642
My guess is you'll have to add the padding, set rotate_labels to False and iterate through all the artists and set_visible(True).
Hakkeh4x0r
@Hakkeh4x0r
Thanks a lot, I'll try out the solution. Another question, I did some digging in Basemap and noticed that it had scalebar (drawmapscale). I cant find a similar solution to add a (white,black,white. black etc) bar i Cartopy. Is this something that will be implemented, or do i need to implement my own solution?
Ryan May
@dopplershift
@Hakkeh4x0r I know at one scipy sprint I saw someone playing around with creating one, but I don't think that landed anywhere. I'd merge a PR adding one, so if you implement one for yourself I'd love to see it submitted as a PR.
Hakkeh4x0r
@Hakkeh4x0r
@dopplershift Okey. Will try to make one then.
Hakkeh4x0r
@Hakkeh4x0r
Does anyone have a solution for our problem described at SciTools/cartopy#1642 ? I desperately need this functionality and is absolutely necessary to solve my problem.
Ryan May
@dopplershift
Looks like there's been activity on the issue
winash12
@winash12
I am using the Plate Carree projection to plot a wind vector field in terms of quivers. I need to superpose this on another dataset .
When I just try to make a quiver plot I get something like this - https://imgur.com/a/224Vu7q
I can barely see the wind direction.
https://scitools.org.uk/cartopy/docs/v0.15/examples/regridding_arrows.html is this the example I need to look at to fix it ?
Ryan May
@dopplershift
yes, that example should get you there. Also, in general, I usually subset the grid for plots like that, by e.g. plotting u[::3, ::3]
winash12
@winash12
Many thanks . That works too
Greg
@greglucas
@QuLogic, have you had any thoughts on a timeline for releasing 0.18.1?
Ryan May
@dopplershift
I think we should skip 0.18.1 at this point and do 0.19
Greg
@greglucas
:+1: on 0.19, but my guess is that one was still a little ways off? So it'd be good to just cut the 0.18.1 branch with the few bug fixes in it
Ryan May
@dopplershift
I’m not a fan of driving the milestone by waiting on things to land. I think we have a significant amount of stuff beyond bug fixes that would be nice to get out. Anything left on 0.19 should either merge quickly or get bumped IMO.
Stephane Raynaud
@stefraynaud
It is hard to run the unit tests due to the conda installation of minimal dependency packages. So it’s hard to go further on PRs.
Greg
@greglucas
#1575 got merged, so we are making some progress there. Are you still having problems with the latest minimal version? I know I struggled with the MPL 2.x installation from conda-forge with the testing label. So make sure you're grabbing from that channel
Stephane Raynaud
@stefraynaud
@greg Following the travis config, I install minimal dependencies with conda install -q -y -c conda-forge/label/testing -c conda-forge --override-channels cython=0.28.5 flufl.lock matplotlib=2.2.2 numpy=1.16 owslib=0.17 pep8 pillow proj4=5.2.0 pyepsg pyshp pytest pytest-xdist python=3.6 requests scipy=1.2.0 setuptools_scm setuptools_scm_git_archive shapely and it always ends with conflicts : Found conflicts! Looking for incompatible packages. …
Stephane Raynaud
@stefraynaud
I fixed it by adding the defaultschannel
winash12
@winash12
I am getting this error while using quiver
ax1.quiver(lons[::3],lats[::3],uipvPlot,vipvPlot,transform=ccrs.PlateCarree()) File "/usr/local/lib/python3.8/dist-packages/Cartopy-0.18.0-py3.8-linux-x86_64.egg/cartopy/mpl/geoaxes.py", line 310, in wrapper return func(self, *args, **kwargs) File "/usr/local/lib/python3.8/dist-packages/Cartopy-0.18.0-py3.8-linux-x86_64.egg/cartopy/mpl/geoaxes.py", line 1841, in quiver u, v = self.projection.transform_vectors(t, x, y, u, v) File "lib/cartopy/_crs.pyx", line 568, in cartopy._crs.CRS.transform_vectors UserWarning: Some vectors at source domain corners may not have been transformed correctly
Stephane Raynaud
@stefraynaud
Appveyor is failing while travis is not: it is hard working on grid labels, since it takes more time to solve CI issues than coding! I have to way to test a windows installation.
Greg
@greglucas
I hear you on that one, it always seems to be something new on various CI systems. You're in a particularly tricky part of the code base because of all the small changes to text/line alignment too. I can't see anything obvious in the Appveyor for why those images would be failing on Windows and not on Linux though. The MPL being used is from the testing labels.
It does look like there are some warnings with pyshp out there and it is getting the most recent pyshp version which had some changes to how they read in the objects. You may want to try adding Fiona to the appveyor installation and see if it is bad shapefiles causing the errors.
winash12
@winash12

ax1.quiver(lons[::3],lats[::3],uipvPlot,vipvPlot,transform=ccrs.PlateCarree()) File "/usr/local/lib/python3.8/dist-packages/Cartopy-0.18.0-py3.8-linux-x86_64.egg/cartopy/mpl/geoaxes.py", line 310, in wrapper return func(self, *args, **kwargs) File "/usr/local/lib/python3.8/dist-packages/Cartopy-0.18.0-py3.8-linux-x86_64.egg/cartopy/mpl/geoaxes.py", line 1841, in quiver u, v = self.projection.transform_vectors(t, x, y, u, v) File "lib/cartopy/_crs.pyx", line 568, in cartopy._crs.CRS.transform_vectors UserWarning: Some vectors at source domain corners may not have been transformed correctly

I forgot to mention that this warning does not generate a plot. The program just exits

Ryan May
@dopplershift
Are uipvPlot and vipvPlot the same size as lons[::3] and lats[::3]? Have you tried making PlateCarree() the projection for plotting just to see if that works or if there's a data issue?
Stephane Raynaud
@stefraynaud
The gridliner is revised in #PR1537 to fix a few issues. Figure samples are available here: https://drive.google.com/drive/folders/15Sz5buIrjPcEz1FwniLgBDYn6GCXvNV7
If ok, I will update baseline images and add a few ones.
Hakkeh4x0r
@Hakkeh4x0r
Hello. What is the plan and timeline for next release (days or weeks)?
dsitaram
@dsitaram
hello, when I try to turn off the axis labels in grid liner (eg. gl.xlabels_top = False), the axis labels remain. I am using the EquidistantConic Projection. Does anyone know how to fix this?
Greg
@greglucas
Which version are you using? It changed to gl.top_labels = False in 0.18 I believe. https://scitools.org.uk/cartopy/docs/latest/matplotlib/gridliner.html
@Hakkeh4x0r , there is not currently any definitive plan for the next release.
emsterr
@emsterr
(@Hakkeh4x0r here), @greglucas okey, I have a couple of PRs that is needed in my production line and hoped they would be accepted in the near future. But I will just set up a in-house solution for now and wait. I created issue #1671, could you give me some feedback when you have the time.
Stephane Raynaud
@stefraynaud
You should probably never wait for official releases for your production line.
emsterr
@emsterr
I do agree @stefraynaud and that is why i asked :) if you have had a release in days or a week, I wouldn't bother wasting time on local integration.
winash12
@winash12

Are uipvPlot and vipvPlot the same size as lons[::3] and lats[::3]? Have you tried making PlateCarree() the projection for plotting just to see if that works or if there's a data issue?

@dopplershift Sorry about that. I will try to keep it here. The original shapes are (73) lats and (144) lons. When I take lons[:3] and lats[:3] I get 48 and 25. So the shapes of uipvPlot and vipvPlot are (25,48) and (25,48) . The thing is that this error does not happen for all data sets. It is sporadic and happens periodically. What more information I need to print out so that I can move forward ?

1 reply
Ray Bell
@raybellwaves
Hopefully this is a quick one. Trying to plot a quiver key to the right of a map. tried the various tight_layout() etc. but didn't work. https://stackoverflow.com/questions/64708303/matplotlib-cartopy-quiver-key-cut-off/64709087#64709087
Stephane Raynaud
@stefraynaud
I'm not sure to understand the problem. What happens if you set x > 1?
1 reply
Stephane Raynaud
@stefraynaud
I see it when I save the figure, but not in spyder for example. so as you suggested, it comes from tight_layout and the way quiverkey objects are registered.
Ray Bell
@raybellwaves
Thanks @stefraynaud. I created a separate matplotlib Q : https://stackoverflow.com/questions/64717968/matplotlib-quiver-key-label-getting-cut
but one person is unable to reproduce it
Karl Schneider
@karlwx
Hi all, I've been a user for a while but decided I'll try contributing for the first time. I have successfully forked cartopy and made my own local repo and a new branch where I'll make some changes. I created a new conda environment, installed all the dependencies, and ran setup.py. However, when I make changes to the code in my local repo it seems to have no effect when I import cartopy and use it. What do I need to be doing to import my changed version?
Greg
@greglucas
It depends on where you're running the code from (in the same directory as the build, or in an external location). I usually install in editable mode pip install -e . and then you shouldn't need to recompile any of the extensions if you're just working in the Python code.
Karl Schneider
@karlwx
Thanks, that's what I needed!
Greg
@greglucas
No problem, looking forward to your contributions! :tada: