I have been working on a continuous data set that when plotted with geom_density
(ggplot2) will have data points cut off when using scale_x_continuous
. The great thing is that xlim()
displays the data just as I need it. Only problem is that xlim seems to eliminate the ability to change the axis tick mark labels, So when my Z-score density plot needs to show every tick mark from -3 to 3, it shows data within that range, but does not display the tick marks at those points, as seen in 1 .
What would be a function that lets me alter the axis tick marks?
UPDATE: this is what: scale_x_continuous(breaks = pretty(a_tubulin_data$Z.Scores, n = 9)) + coord_cartesian(xlim=c(-3,3))
outputs as seen in 2
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.