Skip to content

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

Open

Description

@gorkang

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...

Activity

  1. gorkang commented on Jun 30, 2020

    @gorkang
    OwnerAuthor

    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

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions