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

Support titles using main argument in plot.euler. #27

Closed
jolars opened this issue Apr 5, 2018 · 6 comments
Closed

Support titles using main argument in plot.euler. #27

jolars opened this issue Apr 5, 2018 · 6 comments

Comments

@jolars
Copy link
Owner

jolars commented Apr 5, 2018

No description provided.

@vonjd
Copy link

vonjd commented May 17, 2018

Unfortunately the title doesn't show up in the plot. I also tried par(oma = c(0, 0, 5, 0)) to no avail.

What is strange is that last time I did this (about a year ago) it worked alright.

@jolars
Copy link
Owner Author

jolars commented May 17, 2018

eulerr changed to an internal solution for plotting the diagram in a recent release. It used to rely on lattice, which supported adding a title. You can currently add a title by hand using, for instance, gridExtra::grid.arrange() and grid::textGrob().

@vonjd
Copy link

vonjd commented May 18, 2018

Could you provide a small code example how to create a diagram with title? Thank you

@vonjd
Copy link

vonjd commented May 18, 2018

I also tried title but it gave me an error too: "Error in title(main) : plot.new has not been called yet" This is really inconvenient.

Just some context: I am writing a book about R and I wanted to use your package as the main package in one chapter... but this is really troublesome. Just out of curiosity: why did you change the plotting engine? It seemed to work better than the solution now. Could I use the development version from github or does it have the same problems?

@vonjd
Copy link

vonjd commented May 18, 2018

Ok so the following works:

fit1 <- euler(c("A" = A, "B" = B, "C" = C, "A&B" = AnB, "A&C" = A, "B&C" = B, "A&B&C" = AnB), input = "union")
plot1 <- plot(fit1, fill = c("red", "green", "gray90"))
grid.arrange(grobs = list(plot1), top = "test")

@j-andrews7
Copy link

Thanks, @vonjd, I had tried several options as well. Also feel a short example like this in the docs would be very helpful.

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

No branches or pull requests

3 participants