Folks,
I'm trying to use ggplot in python.
from ggplot import *
ggplot(diamonds, aes(x='price', fill='cut')) + geom_density(alpha=0.25) + facet_wrap("clarity")
Couple things I am trying to do:
1) I expected the color to be both filled and for the lines, but as you can see the color is all grey
2) I am trying to adjust the size of the plot. In R I would run this before the plot:
options(repr.plot.width=12, repr.plot.height=4)
However, that doesn't work here.
Does anyone know how I color in the distribution and also change the plot size?
Thank you. The current output is attached.
Color
Use
color
instead of fill. e.g.;Size
A couple of ways to do this.
Easiest is with
ggsave
- look up the documentation.Alternatively, use
theme
withplot_margin
argument:Or, use matplotlib settings:
Hope that helped!