Skip to content
Snippets Groups Projects
Commit c9df8c12 authored by Sajjad Ghaffarinasabsharabiani's avatar Sajjad Ghaffarinasabsharabiani
Browse files

Update README.md

parent 6961c5f8
No related branches found
No related tags found
No related merge requests found
......@@ -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)+ ...
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment