Module rchart

Class Rchart.PlotOption

java.lang.Object
de.grogra.rchart.Rchart.PlotOption
Enclosing class:
Rchart

public class Rchart.PlotOption extends Object
class that represents a plotting command
  • Constructor Details

    • PlotOption

      public PlotOption()
      constructor
    • PlotOption

      public PlotOption(boolean isGGPLOT2COMMAND)
      constructor
      Parameters:
      isGGPLOT2COMMAND - true if command is from ggplot2
  • Method Details

    • setCommand

      public void setCommand(Rchart.GGPLOT2COMMAND command)
      set the command
      Parameters:
      command -
    • setCommand

      public void setCommand(String command)
      set the command
      Parameters:
      command -
    • addArgument

      public void addArgument(String argument)
      add argument to the command/plot function
      Parameters:
      argument -
    • addAllArguments

      public void addAllArguments(String[] args)
      add arguments to the command/plot function
      Parameters:
      args - argument array
    • getCommand

      public String getCommand()
      get the string representation of the command
      Returns:
      command
    • argumentsCount

      public int argumentsCount()
      get the number of arguments
      Returns:
      count
    • getArgument

      public String getArgument(int i)
      get argument at index i
      Parameters:
      i - index
      Returns:
      argument
    • setArgument

      public void setArgument(int i, String value)
      set argument at index i
      Parameters:
      i - index
      value - argument
    • removeArgument

      public void removeArgument(String arg)
      remove argument
      Parameters:
      arg - argument
    • clearArgumentList

      public void clearArgumentList()
      clear argument list
    • setLineColor

      public Rchart.PlotOption setLineColor(int r, int g, int b)
      set line color
      Parameters:
      r - red value
      g - green value
      b - blue value
      Returns:
      PlotOption instance
    • setLineColor

      public Rchart.PlotOption setLineColor(Color col)
      set line color
      Parameters:
      col - color
      Returns:
      PlotOption instance
    • setLineWidth

      public Rchart.PlotOption setLineWidth(double width)
      set line width
      Parameters:
      width - line width
      Returns:
      PlotOption instance
    • setPointShape

      public Rchart.PlotOption setPointShape(Rchart.PointShape ps)
      set point shape
      Parameters:
      ps - point shape
      Returns:
      PlotOption instance
    • setLineType

      public Rchart.PlotOption setLineType(Rchart.LineType lt)
      set line type
      Parameters:
      lt - line type
      Returns:
      PlotOption instance
    • aes

      public Rchart.PlotOption aes(String addarg)
      add argument to ggplot2 aesthetics mapping
      Parameters:
      addarg - argument to add
      Returns:
      PlotOption instance
    • toString

      public String toString()
      get the string representation of the plot option
      Overrides:
      toString in class Object
      Returns:
      string representation