diff --git a/.gitignore b/.gitignore index 5b6a065..482b80f 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,7 @@ .Rproj.user +.Rproj .Rhistory .RData .Ruserdata +rsconnect/ +.gitignore diff --git a/Shiny_carb_plot.Rmd b/Shiny_carb_plot.Rmd index f258311..e1f450f 100644 --- a/Shiny_carb_plot.Rmd +++ b/Shiny_carb_plot.Rmd @@ -64,19 +64,23 @@ inputPanel( selectInput(inputId = "parameter", label = "dependent parameter", choices = c("ALK", "DIC", "fCO2", "fCO2insitu", "fCO2pot", - "HCO3", "OmegaAragonite", "OmegaCalcite", "pCO2", "pCO2insitu", "pCO2pot", "pH")) + "HCO3", "OmegaAragonite", "OmegaCalcite", "pCO2", "pCO2insitu", "pCO2pot", "pH")), + sliderInput(inputId = "bins", + label = "number of bins in plot", + min = 3, max = 42, value = 11) ) renderPlot({ carb.data() %>% ggplot(aes_string(x = "co2", y = "co3", z = input$parameter)) + - geom_contour(size = 1) + - metR::geom_label_contour() + - scale_x_continuous(expand = c(0, 0)) + + geom_contour(size = 1, breaks = pretty(carb.data()[, input$parameter], n = input$bins)) + + metR::geom_text_contour(breaks = pretty(carb.data()[, input$parameter], n = input$bins), + rotate = TRUE, stroke = 0.3) + + #scale_x_continuous(expand = c(0, 0)) + scale_y_continuous(expand = c(0, 0)) + - theme_light() + + theme_minimal() + theme(text = element_text(size = 20)) -}) +}, width = 1000, height = 700) ```