java.lang.Object
de.grogra.rchart.Rchart.PlotOption
- Enclosing class:
Rchart
class that represents a plotting command
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddAllArguments(String[] args) add arguments to the command/plot functionvoidaddArgument(String argument) add argument to the command/plot functionadd argument to ggplot2 aesthetics mappingintget the number of argumentsvoidclear argument listgetArgument(int i) get argument at index iget the string representation of the commandvoidremoveArgument(String arg) remove argumentvoidsetArgument(int i, String value) set argument at index ivoidsetCommand(Rchart.GGPLOT2COMMAND command) set the commandvoidsetCommand(String command) set the commandsetLineColor(int r, int g, int b) set line colorsetLineColor(Color col) set line colorset line typesetLineWidth(double width) set line widthset point shapetoString()get the string representation of the plot option
-
Constructor Details
-
PlotOption
public PlotOption()constructor -
PlotOption
public PlotOption(boolean isGGPLOT2COMMAND) constructor- Parameters:
isGGPLOT2COMMAND- true if command is from ggplot2
-
-
Method Details
-
setCommand
set the command- Parameters:
command-
-
setCommand
set the command- Parameters:
command-
-
addArgument
add argument to the command/plot function- Parameters:
argument-
-
addAllArguments
add arguments to the command/plot function- Parameters:
args- argument array
-
getCommand
get the string representation of the command- Returns:
- command
-
argumentsCount
public int argumentsCount()get the number of arguments- Returns:
- count
-
getArgument
get argument at index i- Parameters:
i- index- Returns:
- argument
-
setArgument
set argument at index i- Parameters:
i- indexvalue- argument
-
removeArgument
remove argument- Parameters:
arg- argument
-
clearArgumentList
public void clearArgumentList()clear argument list -
setLineColor
set line color- Parameters:
r- red valueg- green valueb- blue value- Returns:
- PlotOption instance
-
setLineColor
set line color- Parameters:
col- color- Returns:
- PlotOption instance
-
setLineWidth
set line width- Parameters:
width- line width- Returns:
- PlotOption instance
-
setPointShape
set point shape- Parameters:
ps- point shape- Returns:
- PlotOption instance
-
setLineType
set line type- Parameters:
lt- line type- Returns:
- PlotOption instance
-
aes
add argument to ggplot2 aesthetics mapping- Parameters:
addarg- argument to add- Returns:
- PlotOption instance
-
toString
get the string representation of the plot option
-