Ben Harrison
2013-05-21 05:38:35 UTC
I am trying to change the aspect ratio of a particular plot, and the only
way I've worked out to do this is with coord_fixed(). If there are other
ways, then this question might be redundant!
The plot describes the changes in a variable (GR) with depth.
Depth being independent, I place it in x, but as per custom, we plot depth
on vertical axis.
I also need depth to be increasing from top to bottom:
ggplot(data=logs, aes(x=DEPTH, y=GR)) + geom_line() +
scale_x_reverse() + coord_flip()
This is fine, but the aspect ratio is unfettered.
last_plot() + coord_fixed(ratio=1)
Has the desired effect, but resets the flip, so that depth is again on the
horizontal axis. Is there a way to combine the two? I haven't been able to
figure it out.
--
--
You received this message because you are subscribed to the ggplot2 mailing list.
Please provide a reproducible example: https://github.com/hadley/devtools/wiki/Reproducibility
To post: email ggplot2-/***@public.gmane.org
To unsubscribe: email ggplot2+unsubscribe-/***@public.gmane.org
More options: http://groups.google.com/group/ggplot2
---
You received this message because you are subscribed to the Google Groups "ggplot2" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ggplot2+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/***@public.gmane.org
For more options, visit https://groups.google.com/groups/opt_out.
way I've worked out to do this is with coord_fixed(). If there are other
ways, then this question might be redundant!
The plot describes the changes in a variable (GR) with depth.
Depth being independent, I place it in x, but as per custom, we plot depth
on vertical axis.
I also need depth to be increasing from top to bottom:
ggplot(data=logs, aes(x=DEPTH, y=GR)) + geom_line() +
scale_x_reverse() + coord_flip()
This is fine, but the aspect ratio is unfettered.
last_plot() + coord_fixed(ratio=1)
Has the desired effect, but resets the flip, so that depth is again on the
horizontal axis. Is there a way to combine the two? I haven't been able to
figure it out.
--
--
You received this message because you are subscribed to the ggplot2 mailing list.
Please provide a reproducible example: https://github.com/hadley/devtools/wiki/Reproducibility
To post: email ggplot2-/***@public.gmane.org
To unsubscribe: email ggplot2+unsubscribe-/***@public.gmane.org
More options: http://groups.google.com/group/ggplot2
---
You received this message because you are subscribed to the Google Groups "ggplot2" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ggplot2+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/***@public.gmane.org
For more options, visit https://groups.google.com/groups/opt_out.