-
Notifications
You must be signed in to change notification settings - Fork 2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Data independent/relative scales for annotation_custom()
#5417
Comments
You can use npc units: And see this |
@smouksassi As far as I can tell the first only works for text labels, the second works nicely, but not for faceted plots (puts the annotation in every facet). What I am after is a simple way of putting PNG icons/pictures on a plot in a way which is independent of the plot itself (i.e. does not depend on what is in the plot such as axis scales, facets, etc). |
Ok care to share some code or mock end results you are after? |
See also #5290 for proposed mechanism of scale-independent aesthetics. |
@smouksassi here is a function I wrote which does something like what I am after. A couple limitations are that it can't be added (with
|
You may want to try |
I consider this issue fixed by #5477. |
Perhaps there is already a way to do this, but can we somehow get data independent scales for the
annotation_custom()
function.I will often want to produce the same plot for different response variables and and want an icon in the top left corner. I know I could do this by getting the max of the y variable and setting ymin/ymax relative to that. However, it would be nice to just have a 0-1 coordinate system that sits over any plot, whether it be a single plot, combination of plots, facet wrap plots, etc. Then annotations can be added at the end in a consistent way.
The text was updated successfully, but these errors were encountered: