r - Plot density with ggplot2 without line on x-axis -


i use ggplot2::ggplot 2d plotting needs, including density plots, find when plotting number of overlapping densities extreme outliers on single space (in different colors) line on x-axis becomes little distracting.

my question then, can remove bottom section of density plot being plotted? if so, how?

you can use example:

library(ggplot2) ggplot(movies, aes(x = rating)) + geom_density() 

enter image description here

should turn out this:

enter image description here

how using stat_density directly

 ggplot(movies, aes(x = rating)) + stat_density(geom="line") 

enter image description here


Comments

Popular posts from this blog

python - pip install -U PySide error -

arrays - C++ error: a brace-enclosed initializer is not allowed here before ‘{’ token -

cytoscape.js - How to add nodes to Dagre layout with Cytoscape -