Documentation of 'jyplot.JyplotVanilla' Java class
JyplotVanilla
jyplot

Class JyplotVanilla

  • All Implemented Interfaces:
    java.io.Serializable
    Direct Known Subclasses:
    Jyplot, Plot


    public class JyplotVanilla
    extends java.lang.Object
    implements java.io.Serializable
    The only dependenecies this class has is to JFreeChart itself. That means that is will load quicker and the memory footprint will be smaller. However, it lacks advanced options such as

    Saving EPS, SVG, or PDF images.

    Nice for-Jython methods

    Passing Colt numerical arrays to plot methods.

    See Also:
    Serialized Form
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method and Description
      void axis(double[] p)
      sets the axis range manually
      BarXYDataset bar(double[] left, double[] height, double[] width, double[] bottom, java.awt.Color color)
      BAR(left, height, width=0.8, bottom=0, color='b', yerr=None, xerr=None, ecolor='k', capsize=3) Make a bar plot with rectangles at left, left+width, 0, height left and height are Numeric arrays.
      void bar(double left, double height, double width, double bottom, java.awt.Color color) 
      void bar(java.util.List<java.lang.Double> left, java.util.List<java.lang.Double> height, java.util.List<java.lang.Double> width, java.util.List<java.lang.Double> bottom, java.awt.Color color) 
      void bar(java.lang.Object[] x, double[] y) 
      void bar(java.lang.Object[] x, double[] y, java.awt.Color color)
      A quick hack to draw bar plots with whatever axis
      void clf()
      Clears the current figure.
      void color(java.awt.Color c)
      Colors the most recent dataset or series
      void color(float value)
      Colors the most recent dataset or series
      void color(int[] rgba)
      Colors the most recent dataset or series
      void color(java.lang.String s)
      Colors the most recent dataset or series
      void connect(ChartMouseListener listener) 
      void difference(double[] x, double[] y1, double[] y2, java.awt.Color color, boolean multipleAxes)
      Plots a difference plot, y1 - y2 is shaded
      void drawToGraphics2D(java.awt.Graphics2D g, int width, int height) 
      Dataset errorbar(double[] x, double[] y, double[] xerr, double[] yerr, java.awt.Color color, boolean barsabove)
      errorbar(x, y, yerr=None, xerr=None, fmt='b-', ecolor=None, capsize=3, barsabove=False
      JFreeChart getChart()
      Get chart
      JFreeChart getChart(int row, int col) 
      java.util.HashMap getChartPanelMap() 
      java.util.HashMap getChartToPanelMap() 
      java.awt.Color getColor(java.lang.String s)
      Converts a string into a Color object.
      int getCols() 
      javax.swing.JFrame getFrame() 
      javax.swing.JPanel getJpanel() 
      int getRows() 
      void grid(boolean state) 
      void gridx(boolean state) 
      void gridy(boolean state) 
      void hist(double[] data, int bins) 
      void hist(double[] data, int bins, java.lang.String dataname) 
      XYDataset hist(double[] data, int bins, java.lang.String dataname, java.awt.Color color) 
      void label(java.lang.String p)
      set series label (key) for the legend for the most recent dataset
      void legend(java.lang.String[] p)
      set series labels (keys) for the legend
      void linecolor(java.awt.Color[] p)
      %% sets the line color for each Series
      void linestyle(java.lang.String[] p)
      %% sets the line style (solid, dashed, ...) for each Series
      void linewidth(float[] p)
      sets the line width for each Series
      void loglog() 
      void loglog(int p)
      transforms axes into a logarithmic scale
      static void main(java.lang.String[] args) 
      XYDataset plot(double[] y) 
      XYDataset plot(double[] x, double[] y)
      Plot X and Y
      XYDataset plot(double[] x, double[] y, java.awt.Color color) 
      XYDataset plot(double[] x, double[] y, java.awt.Color color, java.lang.String dataname, double[] yErrorBars, boolean seperateYAxis, boolean yaxisVisible, java.lang.String rangeLabel, boolean shapesVisible) 
      void savefig(java.lang.String filename)
      This assumes
      void savefig(java.lang.String filename, int width, int height) 
      void setAntiAlias(boolean isAntiAlias)
      Set anti-Alias
      void setBackgColor(java.awt.Color color)
      Sets the actual background color of the entire graph panel.
      void setChart(JFreeChart chart) 
      void setChartToPanelMap(java.util.HashMap chartToPanelMap) 
      void setDomainSpace(double x) 
      void setFrame(javax.swing.JFrame frame) 
      void setJpanel(javax.swing.JPanel jpanel) 
      void setQuitOnWindowClose(boolean close) 
      void setRangeSpace(double x) 
      void setShapesVisible(boolean visible) 
      void show() 
      void show(int width, int height) 
      void subplot(int number) 
      void subplot(int rows, int cols, int plotnumber)
      Holds a list of arrays with the plots
      void text(java.lang.String text, double x, double y)
      Add some text at data coordinates x,y
      void title(java.lang.String p)
      sets the chart title
      void title(java.lang.String p, int fontsize) 
      void xlabel(java.lang.String p)
      sets the x-axis label
      void xlim(double min, double max)
      Sets the x axis range manually
      void xticks(double[] locations, java.lang.String[] ticklabels)
      Not properly tested.
      void xticks(java.util.List<java.lang.Double> locations, java.util.List ticklabels) 
      void ylabel(java.lang.String p)
      sets the y-axis label
      void ylim(double min, double max)
      Sets the y axis range manually
      void yticks(double[] locations, java.lang.String[] ticklabels) 
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • JyplotVanilla

        public JyplotVanilla(boolean enableJFrame)
      • JyplotVanilla

        public JyplotVanilla()
    • Method Detail

      • subplot

        public void subplot(int number)
      • subplot

        public void subplot(int rows,
                            int cols,
                            int plotnumber)
        Holds a list of arrays with the plots
        Parameters:
        rows -
        cols -
        plotnumber -
      • show

        public void show()
      • show

        public void show(int width,
                         int height)
      • plot

        public XYDataset plot(double[] x,
                              double[] y)
        Plot X and Y
        Parameters:
        x - x values
        y - y values
        Returns:
      • plot

        public XYDataset plot(double[] x,
                              double[] y,
                              java.awt.Color color)
      • plot

        public XYDataset plot(double[] x,
                              double[] y,
                              java.awt.Color color,
                              java.lang.String dataname,
                              double[] yErrorBars,
                              boolean seperateYAxis,
                              boolean yaxisVisible,
                              java.lang.String rangeLabel,
                              boolean shapesVisible)
      • title

        public void title(java.lang.String p)
        sets the chart title
        Parameters:
        p -
      • title

        public void title(java.lang.String p,
                          int fontsize)
      • xlabel

        public void xlabel(java.lang.String p)
        sets the x-axis label
        Parameters:
        p -
      • ylabel

        public void ylabel(java.lang.String p)
        sets the y-axis label
        Parameters:
        p -
      • legend

        public void legend(java.lang.String[] p)
        set series labels (keys) for the legend
        Parameters:
        p - []
      • label

        public void label(java.lang.String p)
        set series label (key) for the legend for the most recent dataset
        Parameters:
        p - []
      • linestyle

        public void linestyle(java.lang.String[] p)
        %% sets the line style (solid, dashed, ...) for each Series
        Parameters:
        p - []
      • linewidth

        public void linewidth(float[] p)
        sets the line width for each Series
        Parameters:
        p - []
      • linecolor

        public void linecolor(java.awt.Color[] p)
        %% sets the line color for each Series
        Parameters:
        p - []
      • axis

        public void axis(double[] p)
        sets the axis range manually
        Parameters:
        p - [] gets an array of the axis boundries: p0 = lower x, p1 = upper x p2 = lower y, p3 = upper y
      • xlim

        public void xlim(double min,
                         double max)
        Sets the x axis range manually
      • ylim

        public void ylim(double min,
                         double max)
        Sets the y axis range manually
      • loglog

        public void loglog(int p)
        transforms axes into a logarithmic scale
        Parameters:
        p - assign x- and y-axis as logarithmic
      • loglog

        public void loglog()
      • main

        public static void main(java.lang.String[] args)
        Parameters:
        args - method for testing Jylab
      • bar

        public void bar(java.lang.Object[] x,
                        double[] y,
                        java.awt.Color color)
        A quick hack to draw bar plots with whatever axis
        Parameters:
        y -
        x -
      • bar

        public void bar(java.lang.Object[] x,
                        double[] y)
      • bar

        public void bar(double left,
                        double height,
                        double width,
                        double bottom,
                        java.awt.Color color)
      • bar

        public void bar(java.util.List<java.lang.Double> left,
                        java.util.List<java.lang.Double> height,
                        java.util.List<java.lang.Double> width,
                        java.util.List<java.lang.Double> bottom,
                        java.awt.Color color)
      • bar

        public BarXYDataset bar(double[] left,
                                double[] height,
                                double[] width,
                                double[] bottom,
                                java.awt.Color color)
        BAR(left, height, width=0.8, bottom=0, color='b', yerr=None, xerr=None, ecolor='k', capsize=3) Make a bar plot with rectangles at left, left+width, 0, height left and height are Numeric arrays. *Currently this second argument format is not implemented... Return value is a list of Rectangle patch instances BAR(left, height, width, bottom, color, yerr, xerr, capsize, yoff) xerr and yerr, if not None, will be used to generate errorbars on the bar chart color specifies the color of the bar ecolor specifies the color of any errorbar capsize determines the length in points of the error bar caps The optional arguments color, width and bottom can be either scalars or len(x) sequences This enables you to use bar as the basis for stacked bar charts, or candlestick plots Addition kwargs: hold = [True|False] overrides default hold state
      • xticks

        public void xticks(java.util.List<java.lang.Double> locations,
                           java.util.List ticklabels)
      • xticks

        public void xticks(double[] locations,
                           java.lang.String[] ticklabels)
        Not properly tested.
        Parameters:
        ticklabels -
      • yticks

        public void yticks(double[] locations,
                           java.lang.String[] ticklabels)
      • getChartPanelMap

        public java.util.HashMap getChartPanelMap()
      • drawToGraphics2D

        public void drawToGraphics2D(java.awt.Graphics2D g,
                                     int width,
                                     int height)
      • color

        public void color(java.awt.Color c)
        Colors the most recent dataset or series
        Parameters:
        c -
      • color

        public void color(java.lang.String s)
        Colors the most recent dataset or series
        Parameters:
        s -
      • getColor

        public java.awt.Color getColor(java.lang.String s)
        Converts a string into a Color object. Checks a few local maps and the styleSheet class.
        Parameters:
        s -
        Returns:
      • color

        public void color(int[] rgba)
        Colors the most recent dataset or series
      • color

        public void color(float value)
        Colors the most recent dataset or series
      • getChart

        public JFreeChart getChart()
        Get chart
        Returns:
      • getChart

        public JFreeChart getChart(int row,
                                   int col)
      • setChart

        public void setChart(JFreeChart chart)
      • getChartToPanelMap

        public java.util.HashMap getChartToPanelMap()
      • setChartToPanelMap

        public void setChartToPanelMap(java.util.HashMap chartToPanelMap)
      • getFrame

        public javax.swing.JFrame getFrame()
      • setFrame

        public void setFrame(javax.swing.JFrame frame)
      • getJpanel

        public javax.swing.JPanel getJpanel()
      • setJpanel

        public void setJpanel(javax.swing.JPanel jpanel)
      • text

        public void text(java.lang.String text,
                         double x,
                         double y)
        Add some text at data coordinates x,y
        Parameters:
        text -
        x -
        y -
      • difference

        public void difference(double[] x,
                               double[] y1,
                               double[] y2,
                               java.awt.Color color,
                               boolean multipleAxes)
        Plots a difference plot, y1 - y2 is shaded
      • getCols

        public int getCols()
      • getRows

        public int getRows()
      • hist

        public void hist(double[] data,
                         int bins)
      • hist

        public void hist(double[] data,
                         int bins,
                         java.lang.String dataname)
      • hist

        public XYDataset hist(double[] data,
                              int bins,
                              java.lang.String dataname,
                              java.awt.Color color)
      • grid

        public void grid(boolean state)
      • gridx

        public void gridx(boolean state)
      • gridy

        public void gridy(boolean state)
      • clf

        public void clf()
        Clears the current figure. Preserves compatability with matplotlib.
      • errorbar

        public Dataset errorbar(double[] x,
                                double[] y,
                                double[] xerr,
                                double[] yerr,
                                java.awt.Color color,
                                boolean barsabove)
        errorbar(x, y, yerr=None, xerr=None, fmt='b-', ecolor=None, capsize=3, barsabove=False
      • setRangeSpace

        public void setRangeSpace(double x)
      • setDomainSpace

        public void setDomainSpace(double x)
      • savefig

        public void savefig(java.lang.String filename)
        This assumes
        Parameters:
        filename -
      • savefig

        public void savefig(java.lang.String filename,
                            int width,
                            int height)
      • setQuitOnWindowClose

        public void setQuitOnWindowClose(boolean close)
      • setShapesVisible

        public void setShapesVisible(boolean visible)
      • setBackgColor

        public void setBackgColor(java.awt.Color color)
        Sets the actual background color of the entire graph panel. Note that it is possible to set the color of the area within the axes system separately.
        Parameters:
        color - New background color.
      • setAntiAlias

        public void setAntiAlias(boolean isAntiAlias)
        Set anti-Alias
        Parameters:
        isAntiAlias -

DMelt 3.0 © DataMelt by jWork.ORG

You see the box below because you did not login.