-
-
Notifications
You must be signed in to change notification settings - Fork 403
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Best practices with plot_kde #1157
Comments
Hi @rpgoldman , thanks for the report. The grayscale is weird because Matplotlib's default cmap is viridis, I guess you change it somewhere and thus you are seeing a gray scale. Below there are a few examples of customizing the plots. Probably we should add a few to the gallery and/or docstring.
|
@rpgoldman is this closed? |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Short Description
I was trying to redo some of the plot_kde plots for the "rat tumor" example of Chapter 5 BDA3, building on the notebooks in the PyMC3 resources repo. I had a couple of problems, that may be more documentation issues than anything else:
It seems that one must label the x and y axes in a separate call -- there doesn't seem to be any way to specify the x and y axis labels in the call to
plot_kde
. This seems normal enough to want to do that it should be supported. Perhaps it's supported by one of the keywords arguments, but I couldn't figure out how and the examples in the docs weren't sufficient to figure it out.I tried to use the
contour_kwds
argument to set the number of contours, but that didn't seem to work. Again, an example would have helped.I had two less specific issues, that may be related:
In general I couldn't easily figure out how to use the extra keyword arguments, and I couldn't find examples.
The ArviZ plots I did ended up looking significantly uglier than the Seaborn plots that were in the old version of the notebook. I could use some help figuring out how to style the ArviZ plots.
Code Example or link
From the diagram, here is the seaborn contour plot:
and here is the best ArviZ equivalent I could come up with. It's not very impressive:
The seaborn code is as follows:
and here's what I came up with as an ArviZ alternative:
I'm not sure why it looks so bad. Possibly seaborn's style sheet is messing up the ArviZ plot but... I don't know how styling works with ArviZ. There's an example in the gallery that uses
az.style
, butaz.style
does not appear in the online API docs page.I cargo-culted in
az.style.use("arviz-darkgrid")
from the ArviZ gallery, but it didn't change my grayscale contour plot.For full details of what I was trying to do, see my fork of BDA3.
ArviZ version: master at 8f1677cfd985b2b553dc52571943a830adc29d1c
The text was updated successfully, but these errors were encountered: