Skip to content
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

Unified sticker package? #2

Closed
jorainer opened this issue Mar 14, 2017 · 4 comments
Closed

Unified sticker package? #2

jorainer opened this issue Mar 14, 2017 · 4 comments

Comments

@jorainer
Copy link

@GuangchuangYu @lgatto, I was wondering what the differences between https://github.com/lgatto/sticker and https://github.com/GuangchuangYu/hexSticker is and whether it would be possible to fuse/combine the two to have a single package?

@lgatto
Copy link

lgatto commented Mar 14, 2017

I started sticker to separate code to produce the stickers and outputs themselves, announced the effort here in the hope to make it a community effort, along BioC-stickers. Now there are two, which is a bit unfortunate. I haven't had time to look into any of this for the last couple of day, and might end up just scrapping stickers.

@GuangchuangYu
Copy link
Owner

GuangchuangYu commented Mar 14, 2017

As several of you said my commit that fixed the dimension issue, influence existing code to produce stickers, I start thinking to improve the function separately.

Actually, the influence of Bioconductor/BiocStickers#12 (comment) is tiny. As I only change the dimension to fit for printing.

The issue is due to scaling spaces. Lines and points are in data space, they will be zoom in/out according to the change of output size, but text are in pixel space that will not change. So after reducing dimension size, the text will become larger if you still using previous text size parameter. In my opinion this is tiny, as I also change the default value which can be served as a good reference to specify proper text size.


I really believe using ggtree::subview is better than ggplot2::annotation_custom, but you may have different opinion.

Using subview, you only need to specify width and height which is proportion to the coordination system. Users don't need to specify xmin, xmax, ymin and ymax and they don't need to know the x-y range of the hexagon. This is far more better and have a bonus to support image file. But this will of course broken all your existing codes, and it is the major reason I packed my new solution in another package.

@jorainer
Copy link
Author

I don't know enough to judge whether subview or annotation_custom is better - ultimately, from a user point of view, it would however be nice if you two could team up and work together on the same package.

@GuangchuangYu
Copy link
Owner

@lgatto @jotsetung I added both of you as contributors.

I still have some ideas to improve it. The subview will eventually become geom_subview and goes to ggimage.

I plan to re-write sticker function to something like this:

ggplot() + geom_hex() + geom_pkgname() + geom_subview()

with more freely control of each layer.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants