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

Function to plot both PPV and NPV side by side #19

Open
gorkang opened this issue Oct 24, 2018 · 1 comment
Open

Function to plot both PPV and NPV side by side #19

gorkang opened this issue Oct 24, 2018 · 1 comment

Comments

@gorkang
Copy link
Owner

gorkang commented Oct 24, 2018

Maybe a function that calls PPV_heatmap twice?

a = PPV_heatmap(Max_Prevalence = 100, 
            Sensitivity = 99, 
            Max_FP = 3, 
            Language = "en",
            save_plot = FALSE,
            PPV_NPV = "PPV")


b = PPV_heatmap(Max_Prevalence = 100, 
                Sensitivity = 99, 
                Max_FP = 3, 
                Language = "en",
                save_plot = FALSE,
                PPV_NPV = "NPV")

cowplot::plot_grid(a, b)

Some problems with legends and x labels in low-res monitors...

@gorkang
Copy link
Owner Author

gorkang commented Jun 30, 2020

With patchwork:

library(patchwork)

a = PPV_heatmap(
  Min_Prevalence = 500, 
  Max_Prevalence = 1000, 
  Sensitivity = 90, 
  Max_FP = 2, 
  overlay = "area",
  overlay_prevalence_1 = 600,
  overlay_prevalence_2 = 1000,
  overlay_position_FP = 1, 
  label_title = "PPV"
  )



b = PPV_heatmap(
  PPV_NPV = "NPV",
  Min_Prevalence = 500, 
  Max_Prevalence = 1000, 
  Sensitivity = 90, 
  Max_FP = 2,
  overlay = "area",
  overlay_prevalence_1 = 600,
  overlay_prevalence_2 = 1000, 
  overlay_position_FN = 5,
  label_title = "NPV"
  )


a + b +  plot_layout(guides = 'collect')

plot_combined

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

1 participant