Displaying 4 results from an estimated 4 matches for "annotation_logticks".
2017 Aug 11
2
Annotation Ticks on the axis
...tion(x) 10^x),
labels = scales::trans_format("log10", scales::math_format(10^.x))
) +
scale_y_log10(
breaks = scales::trans_breaks("log10", function(x) 10^x),
labels = scales::trans_format("log10", scales::math_format(10^.x))
) +theme_bw()
p2<-p1 + annotation_logticks()
p2
p2 + scale_y_continuous(sec.axis = sec_axis(~.))
I get the following error :
Scale for 'y' is already present. Adding another scale for 'y', which will
replace the existing scale.
My questions :
1. How do I change the breaks and labels to correspond to those in my
earlier pl...
2017 Aug 11
0
Annotation Ticks on the axis
...= scales::trans_format("log10", scales::math_format(10^.x))
> ) +
> scale_y_log10(
> breaks = scales::trans_breaks("log10", function(x) 10^x),
> labels = scales::trans_format("log10", scales::math_format(10^.x))
> ) +theme_bw()
> p2<-p1 + annotation_logticks()
> p2
>
>
> p2 + scale_y_continuous(sec.axis = sec_axis(~.))
> I get the following error :
> Scale for 'y' is already present. Adding another scale for 'y', which will
> replace the existing scale.
>
StackOverflow question with extensive commentary:
Plot...
2017 Aug 11
2
Annotation Ticks on the axis
...e=3)
axis(side=4,tick=TRUE,at=pretty(range(log(y))))
mtext("log(y) with log labels",side=4,line=3)
par()
I have the following questions :
1. I get a long output after the final par command. How can I make this
output silent?
2. I would like to get ticks corresponding to the command
annotation_logticks in ggplot2. Actually, it would be easiest for me to
work directly with ggplot. But I am not able to implement the secondary
axis option with ggplot. Would appreciate help with that, if it is easier.
Thanks,
Vivek
[[alternative HTML version deleted]]
2017 Aug 11
0
Annotation Ticks on the axis
...("log(y) with log labels",side=4,line=3)
>
> par()
>
>
> I have the following questions :
>
> 1. I get a long output after the final par command. How can I make this output
> silent?
pp<-par()
>
> 2. I would like to get ticks corresponding to the command annotation_logticks
> in ggplot2. Actually, it would be easiest for me to work directly with ggplot. But
> I am not able to implement the secondary axis option with ggplot. Would
> appreciate help with that, if it is easier.
http://ggplot2.tidyverse.org/reference/sec_axis.html
Cheers
Petr
>
> Thanks,...