BiocStickers icon indicating copy to clipboard operation
BiocStickers copied to clipboard

Update sticker scripts to new hexSticker version

Open jorainer opened this issue 8 years ago • 10 comments

The last changes to hexSticker (see issue https://github.com/GuangchuangYu/hexSticker/issues/6) break (almost?) all R scripts to create the stickers.

Update the scripts to create the stickers using the new hexSticker package.

jorainer avatar Mar 21 '17 08:03 jorainer

sorry, should be the last time.

GuangchuangYu avatar Mar 21 '17 08:03 GuangchuangYu

maybe wait a second. Let me see if I can add a parameter to switch from different units

GuangchuangYu avatar Mar 21 '17 08:03 GuangchuangYu

No prob @GuangchuangYu - that's what can be expected when using a devel version.

jorainer avatar Mar 21 '17 08:03 jorainer

@jotsetung I use npc, see https://github.com/GuangchuangYu/ggimage/blob/master/R/geom_subview.R#L41-L44. The width and height are expected to be in proportion to the plot.

It seems the npc is actually native (maybe a bug), so width and height work as in native unit.

## make no sense XD
> require(grid)
Loading required package: grid
> plot(1:10)
> pushViewport(viewport())
> convertX(unit(.9,"npc"),"native")
[1] 0.9native

please go ahead to update your script 🙈, I have no idea why this happened.

GuangchuangYu avatar Mar 21 '17 08:03 GuangchuangYu

@GuangchuangYu , you are not changing hexStickers now, are you?

jorainer avatar Mar 21 '17 08:03 jorainer

@jotsetung no.

GuangchuangYu avatar Mar 21 '17 08:03 GuangchuangYu

OK, fixed all of my stickers. @lgatto, should I keep the issue open until you fixed yours?

jorainer avatar Mar 21 '17 09:03 jorainer

with new version, it is easier to generate treeio sticker.

GuangchuangYu avatar Mar 21 '17 12:03 GuangchuangYu

updated s_width = original s_width * sqrt(3)
updated s_height = original s_height * 2

GuangchuangYu avatar Mar 21 '17 14:03 GuangchuangYu

@lgatto, should I keep the issue open until you fixed yours?

Leave it for now, I'll close once I get time to update mine.

lgatto avatar Mar 21 '17 19:03 lgatto