JuliaPy / PyPlot.jl

Plotting for Julia based on matplotlib.pyplot
https://github.com/JuliaPy/PyPlot.jl
MIT License
475 stars 87 forks source link

Trouble with Cartopy + travis CI #444

Closed briochemc closed 4 years ago

briochemc commented 5 years ago

I have been able to locally use python's Cartopy to plot nice maps from Julia via, e.g.,

using Conda; Conda.add("Cartopy")
using PyPlot, PyCall
ccrs = pyimport("cartopy.crs")
ax = subplot(projection=ccrs.Robinson())
ax.set_global()
ax.stock_img()
ax.coastlines()

(extracted from this gist β€” I don't even know if that's the recommended way.)

However, I have not been able to run such code via Travis CI. (I am trying to generate and deploy documentation that uses Cartopy.) I have tried a few different things, but without success, with every build either failing to find python, matplotlib, or cartopy. So here is my request:

Could I get some help in setting up a MWE of a Cartopy plot run in Julia by Travis CI?

Such a MWE could appear in PyPlot's Readme, and its output image be part of this list of PyPlot examples, or if one could use Cartopy from Plots.jl's pyplot backend, it could be added to the pyplot-backend examples. Maybe this is all trivial to some of you but it would go a long way to help newbs like me! πŸ˜…

briochemc commented 5 years ago

FWIW, I created CartopyCI, a tiny Julia project which just runs the code above, to try things out. Link to its CI here.

briochemc commented 5 years ago

I think I figured it out in CartopyCI. Of course, any suggestion still welcome!