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

theme_BetaAndBit() #15

Open
MarcinKosinski opened this issue Apr 5, 2016 · 6 comments
Open

theme_BetaAndBit() #15

MarcinKosinski opened this issue Apr 5, 2016 · 6 comments

Comments

@MarcinKosinski
Copy link

@pbiecek What would you say about creating BetaAndBit() ggplot theme for adding logos/images of beta to the ggplot? It could be based on this

library(png)
library(grid)
img <- readPNG("~/Obrazy/beta_bit.png")
img2 <- readPNG("~/Obrazy/logo1_beta.png")
img3 <- readPNG("~/Obrazy/logo2_beta.png")
g <- rasterGrob(img, interpolate=TRUE)
g2 <- rasterGrob(img2, interpolate=TRUE)
g3 <- rasterGrob(img3, interpolate=TRUE)


# Dummy plot
df <- data.frame(x = 1:10, y = 1:10)
base <- ggplot(df, aes(x, y)) +
  geom_point() +
  theme_bw()

# Full panel annotation
base + annotation_custom(grob = g,
                         xmin = 8, xmax = 10, ymin = 2, ymax = 4) + 
  annotation_custom(grob = g2,
                    xmin = 2, xmax = 4, ymin = 8, ymax = 10) + 
  annotation_custom(grob = g3,
                    xmin = 5, xmax = 7, ymin = 2, ymax = 4) 

theme_betaandbit

Motivation:
http://stackoverflow.com/questions/12463691/inserting-an-image-to-ggplot-outside-the-chart-area

@pbiecek
Copy link
Member

pbiecek commented Apr 5, 2016

Sounds cool,
It's a must!
But first I need to choose THE logo ;-(

@pbiecek
Copy link
Member

pbiecek commented Apr 11, 2016

@MarcinKosinski Currently I am using following theme for B&B comic plots:

  ... +
  theme_bw() + theme(text=element_text(family="xkcd", size=14),
                     panel.border=element_rect(color="white"))

screen shot 2016-04-11 at 20 28 06

But it's not the final solution, since there are no lowercase letters nor polish characters.

@MarcinKosinski
Copy link
Author

It would be nice to create theme_BetaAndBit() with those instructions with
additional logo marking.
So I am waiting for final logo choice :)

2016-04-11 20:29 GMT+02:00 Przemysław Biecek [email protected]:

@MarcinKosinski https://github.com/MarcinKosinski Currently I am using
following theme for B&B comic plots:

... +
theme_bw() + theme(text=element_text(family="xkcd", size=14),
panel.border=element_rect(color="white"))

[image: screen shot 2016-04-11 at 20 28 06]
https://cloud.githubusercontent.com/assets/4624318/14437939/fd00e6c4-0023-11e6-9a29-b8be2879d5f3.png

But it's not the final solution, since there are no lowercase letters nor
polish characters.


You are receiving this because you were mentioned.
Reply to this email directly or view it on GitHub
#15 (comment)

@pbiecek
Copy link
Member

pbiecek commented Apr 11, 2016

theme_BetaAndBit() or theme_BB() in short sounds good.

It's likely that we will have http://biecek.pl/BB/a39.png as the logo.
possible with different colours.
We will see tomorrow (and if you do not like it le me know by tomorrow ;-) )

@MarcinKosinski
Copy link
Author

theme_BB suits me.

I still stand for http://biecek.pl/BB/a50.png :)

2016-04-11 21:00 GMT+02:00 Przemysław Biecek [email protected]:

theme_BetaAndBit() or theme_BB() in short sounds good.

It's likely that we will have http://biecek.pl/BB/a39.png as the logo.
possible with different colours.
We will see tomorrow (and if you do not like it le me know by tomorrow ;-)
)


You are receiving this because you were mentioned.
Reply to this email directly or view it on GitHub
#15 (comment)

@pbiecek
Copy link
Member

pbiecek commented Apr 13, 2016

I've added stub for theme_BB
https://github.com/BetaAndBit/BetaBitTools/blob/master/R/theme_BB.R
feel free to update it or add other themes

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

2 participants