bayesplot icon indicating copy to clipboard operation
bayesplot copied to clipboard

Suggestion for new vis for GPs

Open mike-lawrence opened this issue 8 years ago • 6 comments

Attached is an archive demonstrating use of the visualization discussed at this ggplot2-users thread. Sorry I didn't formulate this as a pull request, but I don't have time at the moment to delve into how to best merge it with the existing bayesplot frameworks. Also attaching the plot resulting from running the demo. gp_plot_demo.zip gp_plot_demo

mike-lawrence avatar Mar 26 '17 13:03 mike-lawrence

You can simply use

+ theme(panel.ontop = TRUE, panel.background = element_blank())

to put the grid lines on top.

W.

Ax3man avatar Mar 27 '17 07:03 Ax3man

@Ax3man Ah, neat trick!

mike-lawrence avatar Mar 27 '17 14:03 mike-lawrence

Oh, spoke too soon; well, it is a neat trick, but the subsequent grid lines have alpha=1 and theme(panel.grid=element_line(alpha=.5)) yields an error.

mike-lawrence avatar Mar 27 '17 14:03 mike-lawrence

You can use scales::alpha('white', 0.5)), or rgb(1, 1, 1, 0.5) as colors. Although it seems you have to set both major and minor grid lines separately.

Probably related to https://github.com/tidyverse/ggplot2/pull/1754

Ax3man avatar Mar 27 '17 15:03 Ax3man

Cool, thanks to both of you!

@mike-lawrence I'll follow up once I have a chance to put a preliminary implementation up on a branch.

jgabry avatar Mar 27 '17 20:03 jgabry

Seems you were beat to the punch by ggfan::geom_fan(): https://cran.r-project.org/web/packages/ggfan/vignettes/geom_fan.html

mike-lawrence avatar Sep 18 '19 19:09 mike-lawrence