Replies: 1 comment
-
Yeah so I had to refer back to the documentation of ggplot to find it out, but you want to do So in my own code, it looks like from mizani.formatters import percent_format
# Using plotnine, generate histogram of the number of clusters per molecule
base = (ggplot(combined_clusters, aes(x="n_clusters", fill="factor(frac)", y=after_stat('density')) )
+ geom_histogram(binwidth=1, alpha = 0.5, color="black", position="identity")
+ labs(x="Number of clusters per molecule", y="Percentage", title="Histogram of the number of clusters per molecule", fill=r"$f_A$")
+ scale_y_continuous(labels=percent_format())
)
print(base) |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I have a table with a column
x
and a columntotal
. I would like to draw both on a bar plot, withtotal
at the back andx
in front (without stacking, of course). I can't seem to find a way to do so. Is it possible?Beta Was this translation helpful? Give feedback.
All reactions