Displaying 5 results from an estimated 5 matches for "scale_y_reverse".
Did you mean:
scale_x_reverse
2024 Mar 05
1
How to invert axis within defined range with ggplot2 scale_y_reverse?
Hello,
I am drawing some data with ggplot2 and would like to reverse the
order of the y axis and set a custom range for it.
I can do the former but when I add the key `limits` to
`scale_y_reverse` I get an error as shows below and, worse, no data
shown in the plot.
How can I properly set a reverse y scale with a defined range in ggplot2?
Thank you
```
A <- rep(c(0, 3, 6, 12, 24), 3)
B <- c(rep(0,5), rep(1,5), rep(2,5))
V <- c(27.5, 27.01, 27.75, 27.98, 27.4, 25.69,...
2024 Mar 05
1
How to invert axis within defined range with ggplot2 scale_y_reverse?
...97, 23.18, 21.78, 22.49, 21.85, 22.2)
> df <- data.frame(Conc = A, Time = B, Value = V)
> df$Conc = as.factor(df$Conc)
> df$Time = as.factor(df$Time)
> library(ggplot2)
>
> ggplot(df, aes(x=Time, y=Value, colour=Conc, group=Conc)) +
> geom_line() +
> scale_y_reverse(limits = c(20,30)) +
> geom_point(size=6) +
> scale_colour_manual(values = COLS)
The limits should be `c(30,20)`.
Duncan Murdoch
2009 Dec 15
1
for loop for automatic pdf generation
...uot;))
qplot(measurment_num, value , data=subset(braggxsec.melt,
Creek==list.names[i]), colour=variable, geom="line", xlab="meters
across the channel", ylab="meters from bankfull", col="black",
linetype=variable,
main=list.names[i])+facet_grid(station~Creek)+scale_y_reverse(breaks=breaks)+scale_x_reverse()+theme_bw()+
opts(panel.grid.minor = theme_blank(), panel.grid.major=theme_blank())
dev.off()
}
--
Stephen Sefick
Let's not spend our time and resources thinking about things that are
so little or so large that all they really do for us is puff us up and
make...
2007 Oct 31
1
reversing the scale on ggplot
Dear All,
I am trying to build a simple ggplot, but where the scale is
reversed, i.e. the largest numbers are on the bottom.
An example of the code I am using is
> plotdata<-data.frame(x=1:10, y=runif(10))
> plot<-ggplot()
> plot<-plot+layer(data=plotdata, mapping=aes_string(x='x',y='y'),
geom='point', stat='identity', size=4)
>
2011 Aug 17
2
dotchart vs. dotplot ... groups
I'm trying to create a dotplot with some grouping.
I've been able to create what I want using dotchart (basic graphics), but can't quite get it using dotplot (lattice). I prefer to use lattice (or ggplot2) because I think it's a bit easier to control some other aspects of the plot appearance.
Basically, w/ lattice I've not been able to get the y-axis label to include the