-
Notifications
You must be signed in to change notification settings - Fork 0
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
add logo to bottom right of plots #2
base: main
Are you sure you want to change the base?
Conversation
@avahoffman latest commit adds a rendered README (with the adding an AnVIL logo in the example commented out since that's not merged just yet) |
Great! Can you make sure this is up to date with |
Up to date with main now! Thanks for the reminder! |
You might need to push to origin (this PR) still :) |
Yeah -- sorry about that -- pushed to origin as well now |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would be great to have pictures of the rendered plots!
#' Higher values shift towards the right, lower values shift towards the left | ||
#' @param y_unit Numeric value indicating the amount of vertical shifting. | ||
#' Greater values result in downward shifting, smaller values result in an upward shifting | ||
#' @param height_unit Numeric value specifying height |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
#' @param height_unit Numeric value specifying height | |
#' @param height_unit Numeric value specifying height (size) of the logo |
# Render raster object | ||
render_png <- function(file_name, | ||
x_unit = NULL, y_unit = NULL, | ||
height_unit = NULL, width_unit = NULL){ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Any reason to have the width_unit
arg? Looks like you aren't using it. Might swap height_unit
for an arg like size
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I ported over the function from Howard's hutchplot: https://github.com/FredHutch/hutchplot/blob/main/R/logo.R
I kept it even though I recognize the width unit isn't used clearly because of a review comment asking for those arguments (FredHutch/hutchplot#3 (comment)). Happy to change/simplify/whatever makes sense
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I agree with the previous comments that the user should be able to adjust size. However, we should clean up args that aren't being used. I'd either:
- Remove width_unit as an argument
- Make it so that width_unit is used inside render_png and anvil_logo
Up to you, whichever you prefer! Personally I think a single argument like size
might be more intuitive and also prevent folks from "warping" the logo dimensions.
plot(anvil_palette_discrete) | ||
``` | ||
|
||
<img src="man/figures/README-unnamed-chunk-4-1.png" width="100%" /> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
do you intend for there to be figures here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hopefully they are there now! Sorry I missed adding those
On top of having some AnVIL specific color palettes available, adding the possibility to include an AnVIL logo (full or just the anvil image) on the bottom right of plots. Using Howard's example from the hutchplot package here as well.