Skip to content

Commit

Permalink
Blend out grooves, without using color
Browse files Browse the repository at this point in the history
  • Loading branch information
heike committed May 25, 2024
1 parent c14b87f commit db3ab80
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 12 deletions.
26 changes: 15 additions & 11 deletions app/helper.R
Original file line number Diff line number Diff line change
Expand Up @@ -36,20 +36,24 @@ identify_bullet <- function(words) {


groove_plot <- function(ccdata, grooves) {
# browser()
ccdata %>%
ggplot(aes(x = x, y = value)) +
theme_bw()+
geom_vline(xintercept = 0, colour = "blue") +
geom_vline(xintercept = grooves[2]-grooves[1], colour = "blue") +
geom_line(linewidth = 1) + # put signal in front
# theme_bw()+
geom_vline(xintercept = 0, colour = "grey50") +
geom_vline(xintercept = grooves[2]-grooves[1], colour = "grey50") +
geom_line(linewidth = .5) + # put signal in front
annotate("rect", fill="grey50", alpha = 0.15, xmax = 0, xmin = -Inf, ymin = -Inf, ymax = Inf) +
annotate("rect", fill="grey50", alpha = 0.15, xmax = Inf, xmin = grooves[2]-grooves[1], ymin = -Inf, ymax = Inf) +
geom_line(linewidth = 1, data = filter(ccdata, between(x, 0, grooves[2]-grooves[1]))) + # put signal in front
scale_x_continuous(
breaks=c(0,round(as.numeric(grooves[2]-grooves[1]),0),round(seq(min(ccdata$x),max(ccdata$x),by=500),-2))) +
xlab("Position along width of Land [µm]") +
ylab("Surface Height [µm]") +
theme(
axis.text=element_text(size=16),
axis.title=element_text(size=18),
plot.title = element_text(size=22,face="bold")
#axis.text.x = element_text(angle = 90, hjust = 1)
)
ylab("Surface Height [µm]")
# theme(
# axis.text=element_text(size=16),
# axis.title=element_text(size=18),
# plot.title = element_text(size=22,face="bold")
# #axis.text.x = element_text(angle = 90, hjust = 1)
# )
}
4 changes: 3 additions & 1 deletion app/server.R
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,9 @@ library(bulletxtrctr) # remotes::install_github("heike/bulletxtrctr")
options(shiny.maxRequestSize = 30*1024^2)
addResourcePath("images", "images")
theme_set(theme_bw())
theme_update(text = element_text(size = 18))
theme_update(
text = element_text(size = 18),
plot.title = element_text(size=22,face="bold"))

#################################################################################
## Helper Functions
Expand Down

0 comments on commit db3ab80

Please sign in to comment.