-
Notifications
You must be signed in to change notification settings - Fork 9
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
Specify width, instead of height, when plotting phylopics #103
Comments
Hi @megaraptor1, thanks for submitting your issue! I believe this is the intended behavior. |
Ah, never mind, I thought the shark was going from -.25 to .25, but I see it is actually -.025 to .025, so only a height of 0.05. I'll look into this when I get a chance, thanks! |
What I really need is a way to scale the shark so the tip of its nose is at 0 and the tip of its tail is at 1 (x length of image is 1). There does not appear to be a way to do this based on current documentation. |
Ah, I see. Right now, as you've discovered, we scale the image based on it's height. The height shouldn't change as long as the |
I am unable to tweak the width like that because I have to get this graph to line up with another graph |
I will look into having a way to specify the width OR the height. |
Just tried playing around with the width of the plot until I get the shark the right size. Does not really work. The size of the figure is heavily dependent on the size of surrounding elements. If I plot another figure on top of it I can kind of get it to work, but the function as written now seems heavily dependent on the existence of a pre-existing graph to scale silhouettes. |
|
Does not work. The two graphs do not match up when I try to stitch them together in
I managed to find a workaround where I digitized the .svg silhouette from Phylopic, extracted the X-Y coordinates from it in a third-party software, and then plotted those coordinates as a polygon to be able to more precisely control the length of the silhouette. |
I'm currently working on allowing users to specify the width of the silhouette instead of the height, but I'm glad you found a workaround in the meantime @megaraptor1. |
ysize
argument in add_phylopic
Describe the bug
The
ysize
argument inadd_phylopic
is ignored ifggplot:coord_cartesian
is called. It is not possible to scale images imported viarphylopic
.To Reproduce
Expected behavior
The silhouette should be plotted and take up about 50% of the size of the resulting ggplot.
Screenshots
Argument
ysize
is set to 0.5 when this image was plotted, andcoord_cartesian
was set toxlim=c(0,1)
Desktop (please complete the following information):
Additional context
Add any other context about the problem here.
The text was updated successfully, but these errors were encountered: