I want to transform the coordinate (not the scale/values) so that the y variable (flipped to x) is better spaced. I thought it would be coord_trans(y=\"log10\")
or
OK so now that I understand your question, here's the answer in hopes it will help others.
First, the coord_*
functions cannot be stacked - they override each other. So tthe way you are using it, coord_flip(...)
overrides coord_trans(...)
and you don't see any transformations.
To get log10 spacing with tick labels based on the linear spacing, with flipped coordinates, you can use the breaks=...
argument to scale_*
, as in:
ggplot(dat) +
geom_point(aes(y=median, x=name)) +
scale_y_log10(breaks=1000*(1:3)) + # note use of breaks=...
coord_flip() +
theme_bw() +
theme(
panel.grid.major = element_blank(),
panel.grid.minor = element_blank(),
panel.border = element_blank(),
axis.line = element_line(color = 'black'),
panel.background = element_blank(),
axis.title.y = element_blank())