Skip to content

Conversation

natgeo-wong
Copy link
Contributor

Added note on xarray dependency for colorbar positioning.

Added note on `xarray` dependency for colorbar positioning.
@briochemc
Copy link
Owner

Hey! Thanks for contributing!

I'm not sure I understand. I don't think I installed xarray myself? Maybe I'm missing something? (Oh and I think the underlying Matplotlib can read strings like "\$f(x)\$".)

Also, not sure you noticed, but all the examples use PyCall only, no using PyPlot anymore... So maybe that's what is confusing me. But again maybe the root of the confusion is in the way I set things up locally (which I have not cleanly reported here). Just to be sure, could you try the examples on your machine(s) for a quick check? (Just copy-pasting and see if the plots look OK and if there is no error?)

@natgeo-wong
Copy link
Contributor Author

natgeo-wong commented May 7, 2020

I needed to install xarray because there was some numpy issue when it came to colorbars.

The underlying matplotlib reads Latex when the string is given in the form label=r"$latex$ stuff". However, to convert it properly from a PyCall object into string that can be displayed by Julia, you need to use L instead of r in front of the string, but PyPlot cannot parse that alone. So you need LaTeXStrings to help parse.

Because the thing is that ProPlot is dependent on PyPlot/matplotlib as a backend, so a lot of the functionalities come from it actually.

I've tried the colorbar example, and had to use xarray to resolve the issue, because that was what was giving me problems. Everything else seems fine.

@briochemc briochemc merged commit 631a21f into briochemc:master May 7, 2020
@briochemc
Copy link
Owner

OK thanks for the clarifications. I merged the change. At some point I should try to deploy the plots during CI, so that I will be forced to exactly pin down what prerequisites/deps are needed... 🙂

@natgeo-wong natgeo-wong deleted the patch-1 branch May 8, 2020 04:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants