JuliaPy / PyPlot.jl

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

using PyPlot.axes in module ... conflicts with an existing identifier #398

Closed MaxandreJ closed 5 years ago

MaxandreJ commented 5 years ago

Hi,

When I import PyPlot using using PyPlot I get the following Warning: using PyPlot.axes in module ... conflicts with an existing identifier

After a little search online this seems to be a conflict with Juno. I know I can do import PyPlot instead of using PyPlot but this feels a little clunky. It would be great if I could use using PyPlot without any conflicts with a standard module! Maybe this is rather an issue with Juno though...

Best, Maxandre

gabrielgellner commented 5 years ago

My understanding this is an issue with julia 0.7 / 1.0 taking this name for a standard array operation in Julia, not a Juno issue. It is kind of a tricky problem as it is the standard name in matplotlib for a plotting axes, and given that PyPlot.jl aims to be a literal translation of this api it would need to be somehow shielded like with plot[:axes] which could be super inconvenient.

MaxandreJ commented 5 years ago

Okay, thanks for letting me know. I suppose that this issue can't reasonably be solved then.

tkf commented 5 years ago

I think we should just stop exporting axes. Once https://github.com/JuliaPy/PyCall.jl/pull/517 is merged you can just do plt.axes().

stevengj commented 5 years ago

Fixed by c7afdfd64539ff411df565d8b74ed63fcf6aee86 ... you can just use PyPlot.axes to refer to this function.