java.lang.Object
de.grogra.rchart.Rchart.PlotOption
- Enclosing class:
- Rchart
class that represents a plotting command
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
addAllArguments
(String[] args) add arguments to the command/plot functionvoid
addArgument
(String argument) add argument to the command/plot functionadd argument to ggplot2 aesthetics mappingint
get the number of argumentsvoid
clear argument listgetArgument
(int i) get argument at index iget the string representation of the commandvoid
removeArgument
(String arg) remove argumentvoid
setArgument
(int i, String value) set argument at index ivoid
setCommand
(Rchart.GGPLOT2COMMAND command) set the commandvoid
setCommand
(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
-