Description Usage Arguments Value Examples
mp.s make a plot with one or more series. The object parameter require a ggplot object (Look at the examples).
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26  | mp.s(
  object,
  xaxis,
  yaxis,
  ybreaks = 10,
  percent = FALSE,
  yaccuracy = 0.01,
  ydecimalmark = ".",
  title = "Title",
  xlab = "X axis",
  ylab = "Y axis",
  stitle = NULL,
  note = NULL,
  ctitles = "black",
  cscales = ctitles,
  cbgrid = "white",
  clgrid = cbgrid,
  cplot = "white",
  cticks = "black",
  pnote = 1,
  cbord = cplot,
  titlesize = 20,
  wordssize = 12,
  snote = 11,
  xlim = NULL
)
 | 
object | 
 a ggplot graphic object  | 
xaxis | 
 x axis of one of your graphics  | 
yaxis | 
 y axis of one of your graphics  | 
ybreaks | 
 number of y axis breaks (default=10)  | 
percent | 
 If TRUE y axis in percent (default=F)  | 
yaccuracy | 
 a round for y axis (default=0.01)  | 
ydecimalmark | 
 y decimal mark (default=".")  | 
title | 
 title of plot  | 
xlab | 
 x axis label  | 
ylab | 
 y axis label  | 
stitle | 
 subtitle  | 
note | 
 note  | 
ctitles | 
 color of titles (title,xlab,ylab)  | 
cscales | 
 color of the scales (default= same ctitles)  | 
cbgrid | 
 color of grid background  | 
clgrid | 
 color of grid lines  | 
cplot | 
 color of plot background  | 
cticks | 
 color of axis ticks  | 
pnote | 
 position of note (default=1) (only numbers)  | 
cbord | 
 color of plot border (default= same cplot)  | 
titlesize | 
 size of title (default=20) (only numbers)  | 
wordssize | 
 size of words (default=12) (only numbers)  | 
snote | 
 size of note (default=11) (only numbers)  | 
xlim | 
 limit of x axis (default=NULL)  | 
Return a graphic.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24  | v=data.frame("x"=c('a','b','c','d','e'),"y"=c(5,3,7,10,9),"y2"=c(7,2,5,8,7))
g= ggplot2::ggplot()+ggplot2::geom_line(mapping=ggplot2::aes(x=v$x,y=v$y,group=1),lwd=2)+
ggplot2::geom_line(mapping=ggplot2::aes(x=v$x,y=v$y2,group=1),color='blue',lwd=2)
mp.s(object=g,xaxis=v$x,yaxis=v$y,title="Simple example")
mp.s(g,v$x,v$y,percent=TRUE,title="Example with percent data",xlab=NULL,ylab=NULL)
mp.s(g,v$x,v$y,percent=TRUE,yaccuracy=1,title="y accuracy set",xlab=NULL,ylab=NULL)
g= ggplot2::ggplot()+ggplot2::geom_area(mapping=ggplot2::aes(x=v$x,y=v$y),
fill='red',lwd=2,group=1)+
ggplot2::geom_area(mapping=ggplot2::aes(x=v$x,y=v$y2),fill='blue',lwd=2,group=1)
mp.s(g,v$x,v$y,title="Example with area plot")
v=data.frame("x"=c('a','b','c','d','e'),"y"=c(5,-3,-6,10,7))
g= ggplot2::ggplot()+ggplot2::geom_col(ggplot2::aes(x=v$x,y=v$y,group=1),
fill=p.colorbypositive(v$y),color='black',lwd=1)+
ggplot2::geom_line(ggplot2::aes(x=v$x,y=v$y,group=1),color='black',lwd=1)
mp.s(g,v$x,v$y,title="Example with colorbypositive",xlab=NULL,ylab=NULL)
 | 
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.