[R] Is there a way to coerce ggplot into using min & max values for x & y axes?
Ulrik Stervbo
ulrik.stervbo at gmail.com
Tue Jul 12 06:52:34 CEST 2016
Hi Ken,
You can use coord_cartesian() to set axis. Or if it makes sense to your
problem you can facet your plot.
Hope this helps
Ulrik
KMNanus <kmnanus at gmail.com> schrieb am Di., 12. Juli 2016 01:35:
> I’m plotting few dozen variables, doing so because I need to examine them
> one at a time. The range of these variables varies widely. One can range
> from -.5 to .03, another from -600 to +750.
>
> I want both axes to automatically plot from both min and max values for
> both continuous variables.
>
> I’ve tried - stat_summary(fun.ymax=max, fun.ymin=min), but it doesn’t
> plot to the min and max values.
>
> This code neither plots to the min/max nor does it create tick marks on
> either axis - scale_y_continuous(breaks = c(min(b12.2$myvar), 0,
> max(b12.2$myvar)))
>
> Has anyone faced this situation before? I appreciate the help.
>
> Ken
> kmnanus at gmail.com
> 914-450-0816 (tel)
> 347-730-4813 (fax)
>
>
>
> ______________________________________________
> R-help at r-project.org mailing list -- To UNSUBSCRIBE and more, see
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide
> http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.
[[alternative HTML version deleted]]
More information about the R-help
mailing list