Class PlotParameters

java.lang.Object
cnuphys.splot.plot.PlotParameters

public class PlotParameters extends Object
  • Constructor Details Link icon

    • PlotParameters Link icon

      public PlotParameters(PlotCanvas canvas)
      Create plot parameters for a canvas
      Parameters:
      canvas - the canvas
  • Method Details Link icon

    • mustIncludeXZero Link icon

      public void mustIncludeXZero(boolean incZero)
      Force the plot to include x = 0
      Parameters:
      incZero - the flag
    • mustIncludeYZero Link icon

      public void mustIncludeYZero(boolean incZero)
      Force the plot to include y = 0
      Parameters:
      incZero - the flag
    • getExtraStrings Link icon

      public String[] getExtraStrings()
      Get the extra strings for a second legend like display
      Returns:
      the extra strings
    • setExtraStrings Link icon

      public void setExtraStrings(String... extraStrings)
      Set the extra strings for a second legend like display
      Parameters:
      extraStrings - the new extra strings array
    • isExtraBorder Link icon

      public boolean isExtraBorder()
      Check whether the extra text border is drawn
      Returns:
      true if the extra text border is drawn.
    • setExtraBorder Link icon

      public void setExtraBorder(boolean extraBorder)
      Set whether the extra text border is drawn
      Parameters:
      extraBorder - true if the extra text border is drawn.
    • isLegendBorder Link icon

      public boolean isLegendBorder()
      Check whether the legend border is drawn
      Returns:
      true if the legend border is drawn.
    • setLegendBorder Link icon

      public void setLegendBorder(boolean legBorder)
      Set whether the legend border is drawn
      Parameters:
      legBorder - true if the legend border is drawn.
    • setTextBackground Link icon

      public void setTextBackground(Color color)
      Set the legend fill color
      Parameters:
      color - the legendfill color
    • getTextBackground Link icon

      public Color getTextBackground()
      Get the legend fill color
      Returns:
      the legend fill color
    • setTextForeground Link icon

      public void setTextForeground(Color color)
      Set the legend text color
      Parameters:
      color - the legend text color
    • getTextForeground Link icon

      public Color getTextForeground()
      Get the legend text color
      Returns:
      the legend text color
    • getTextBorderColor Link icon

      public Color getTextBorderColor()
      Get the legend border color
      Returns:
      the legend border color
    • setTextBorderColor Link icon

      public void setTextBorderColor(Color color)
      Set the legend border color
      Parameters:
      color - the legend border color
    • setTextFont Link icon

      public void setTextFont(Font font)
      Set the legend font
      Parameters:
      font - the legend font
    • getTextFont Link icon

      public Font getTextFont()
      Get the legend font
      Returns:
      the legend font
    • setExtraBackground Link icon

      public void setExtraBackground(Color color)
      Set the extra text fill color
      Parameters:
      color - the extra text fill color
    • getExtraBackground Link icon

      public Color getExtraBackground()
      Get the extra text fill color
      Returns:
      the extra text fill color
    • setExtraForeground Link icon

      public void setExtraForeground(Color color)
      Set the extra text color
      Parameters:
      color - the extra text color
    • getExtraForeground Link icon

      public Color getExtraForeground()
      Get the extra text color
      Returns:
      the extra text color
    • getExtraBorderColor Link icon

      public Color getExtraBorderColor()
      Get the extra text border color
      Returns:
      the extra text border color
    • setExtraBorderColor Link icon

      public void setExtraBorderColor(Color color)
      Set the extra text border color
      Parameters:
      color - the extra text border color
    • setExtraFont Link icon

      public void setExtraFont(Font font)
      Set the extra text font
      Parameters:
      font - the new extra text font
    • getExtraFont Link icon

      public Font getExtraFont()
      Get the extra text font
      Returns:
      the extra text font
    • setTitleFont Link icon

      public void setTitleFont(Font font)
      Set the title font
      Parameters:
      font - the new title font
    • getTitleFont Link icon

      public Font getTitleFont()
      Get the title font
      Returns:
      the title font
    • setAxesFont Link icon

      public void setAxesFont(Font font)
      Set the axes font
      Parameters:
      font - the new axes font
    • getAxesFont Link icon

      public Font getAxesFont()
      Get the axes font
      Returns:
      the axes font
    • setStatusFont Link icon

      public void setStatusFont(Font font)
      Set the status font
      Parameters:
      font - the new status font
    • getStatusFont Link icon

      public Font getStatusFont()
      Get the status font
      Returns:
      the status font
    • setLegendLineLength Link icon

      public void setLegendLineLength(int legLineLen)
      Set the legend line length
      Parameters:
      legLineLen - the line length in pixels
    • getLegendLineLength Link icon

      public int getLegendLineLength()
      Get the legend line length
      Returns:
      legLineLen the line length in pixels
    • includeXZero Link icon

      public boolean includeXZero()
      Check whether to include x = 0
      Returns:
      true if we should include x = 0
    • includeYZero Link icon

      public boolean includeYZero()
      Check whether to include y = 0
      Returns:
      true if we should include y = 0
    • addPlotLine Link icon

      public void addPlotLine(PlotLine line)
      Add a plot line to the plot
      Parameters:
      line - the line to add
    • removePlotLine Link icon

      public void removePlotLine(PlotLine line)
      Remove a plot line from the plot
      Parameters:
      line - the line to remove
    • getPlotLines Link icon

      public Vector<PlotLine> getPlotLines()
      Get all the plot lines
      Returns:
      all the plot lines
    • getPlotTitle Link icon

      public String getPlotTitle()
      Get the plot title
      Returns:
      the plot title
    • setPlotTitle Link icon

      public void setPlotTitle(String title)
      Set the plot title
      Parameters:
      title - the plot title
    • getXLabel Link icon

      public String getXLabel()
      Get the label for the x axis
      Returns:
      the label for the x axis
    • getYLabel Link icon

      public String getYLabel()
      Get the label for the y axis
      Returns:
      the label for the y axis
    • setXLabel Link icon

      public void setXLabel(String label)
      Set the x axis label
      Parameters:
      label - the plot x axis label
    • setYLabel Link icon

      public void setYLabel(String label)
      Set the y axis label
      Parameters:
      label - the plot y axis label
    • extraDrawing Link icon

      public boolean extraDrawing()
      Check whether we should draw extra text
      Returns:
      whether we should draw the extra text
    • setExtraDrawing Link icon

      public void setExtraDrawing(boolean draw)
      Set whether we should draw the extra text
      Parameters:
      draw - the new drawing flag
    • isLegendDrawn Link icon

      public boolean isLegendDrawn()
      Check whether we should draw a legend
      Returns:
      whether we should draw a legend
    • setLegendDrawing Link icon

      public void setLegendDrawing(boolean draw)
      Set whether we should draw a legend
      Parameters:
      draw - the new drawing flag
    • gradientDrawing Link icon

      public boolean gradientDrawing()
      Check whether we should draw a gradient
      Returns:
      whether we should draw a legend
    • setGradientDrawing Link icon

      public void setGradientDrawing(boolean draw)
      Set whether we should draw a gradient
      Parameters:
      draw - the new drawing flag
    • getNumDecimalX Link icon

      public int getNumDecimalX()
      The number of decimals for tick values on x axis
      Returns:
      the numDecimalX
    • setNumDecimalX Link icon

      public void setNumDecimalX(int numDecimalX)
      Set the number of decimals for tick values on x axis
      Parameters:
      numDecimalX - the numDecimalX to set
    • getMinExponentX Link icon

      public int getMinExponentX()
      The exponent where we switch to scientific notation on the x axis
      Returns:
      the minExponentX
    • setMinExponentX Link icon

      public void setMinExponentX(int minExponentX)
      Set the exponent where we switch to scientific notation on the x axis
      Parameters:
      minExponentX - the minExponentX to set
    • getNumDecimalY Link icon

      public int getNumDecimalY()
      The number of decimals for tick values on y axis
      Returns:
      the numDecimalY
    • setNumDecimalY Link icon

      public void setNumDecimalY(int numDecimalY)
      Set the number of decimals for tick values on y axis
      Parameters:
      numDecimalY - the numDecimalY to set
    • getMinExponentY Link icon

      public int getMinExponentY()
      The exponent where we switch to scientific notation on the y axis
      Returns:
      the minExponentY
    • setMinExponentY Link icon

      public void setMinExponentY(int minExponentY)
      Set the exponent where we switch to scientific notation on the y axis
      Parameters:
      minExponentY - the minExponentY to set
    • setXRange Link icon

      public void setXRange(double xmin, double xmax)
      Manually set the x range
      Parameters:
      xmin - the minimum x
      xmax - the maximum x
    • setYRange Link icon

      public void setYRange(double ymin, double ymax)
      Manually set the y range
      Parameters:
      xmin - the minimum y
      xmax - the maximum y
    • getManualXMin Link icon

      public double getManualXMin()
      Get the minimum value for a manual X range
      Returns:
      the value for a manual X range
    • getManualXMax Link icon

      public double getManualXMax()
      Get the maximum value for a manual X range
      Returns:
      the value for a manual X range
    • getManualYMin Link icon

      public double getManualYMin()
      Get the minimum value for a manual Y range
      Returns:
      the value for a manual Y range
    • getManualYMax Link icon

      public double getManualYMax()
      Get the maximum value for a manual Y range
      Returns:
      the value for a manual Y range
    • getXLimitsMethod Link icon

      public LimitsMethod getXLimitsMethod()
      Get the limit method for the x axis
      Returns:
      the limit method for the x axis
    • setXLimitsMethod Link icon

      public void setXLimitsMethod(LimitsMethod method)
      Set the limits method for the x axis
      Parameters:
      method - the method
    • getYLimitsMethod Link icon

      public LimitsMethod getYLimitsMethod()
      Get the limit method for the y axis
      Returns:
      the limit method for the y axis
    • setYLimitsMethod Link icon

      public void setYLimitsMethod(LimitsMethod method)
      Set the limits method for the y axis
      Parameters:
      method - the method