-
Notifications
You must be signed in to change notification settings - Fork 241
Closed
Labels
Description
Hello,
I'm coming from R + ggplot2 and I'm not sure what I'm doing wrong here to change the axis title.
from plotnine import *
from plotnine.data import *
p = ggplot(aes(x='displ', y='cty'), mpg) + scale_x_continuous(name="foo")
p + geom_point()
From the docs
class plotnine.scales.scale_x_continuous(**kwargs)
name (str, optional) -- Name used as the label of the scale. This is what shows up as the axis label or legend title.
R equivalent:
library(ggplot2)
data(mtcars)
ggplot(mtcars, aes(x=disp, y=mpg)) + geom_point() + scale_x_continuous(name="foo")
Thanks for taking a look, and sorry if I've misunderstood due to being new to plotnine.

