diff --git a/README.md b/README.md index caf378aae7b81cbbecfc2fe386e61e9baffba994..f4deb369f6804c6f137066b7fcc1eab28bcf8114 100644 --- a/README.md +++ b/README.md @@ -9,7 +9,7 @@ You can use the stylesheet file like so: ## Example code -To utilize the "CCB_plot_style" function in your ggplot codes, simply incorporate it into your code. With "mycolor", you have the flexibility to select from various colors to represent your data. +After sourcing the function, you can use it in your ggplot codes by including the "CCB_plot_style" function code in your ggplot script. With "mycolor", you have the flexibility to select from various colors to represent your data. ``` library(ggplot2) @@ -19,14 +19,15 @@ source("https://gitlab.cs.uni-duesseldorf.de/ghaffarinasabsharabiani/ccb_theme/- #line chart with points - +#Here, "data" represents the data frame you want to plot, and "x" and "y" represent the variables you want to plot on the x and y #axes, respectively. +#The ellipsis (...) represents any other ggplot2 code you want to add to customize your plot. df=data.frame(x=1:10,y=rnorm(10)) ggplot(df,aes(x=x,y=y))+ geom_point()+ geom_line(linewidth=1.5,color=mycolor[1])+ CCB_plot_style()+ - scale_color_manual(values = mycolor) + scale_color_manual(values = mycolor)+ ...