Documentation of 'jhplot.HPlotChart' Java class.
HPlotChart
jhplot

Class HPlotChart



  • public class HPlotChartextends Object
    A canvas to keep jFreeChart charts, interact with them, and export to images. This class can be used to export jFreeChart charts to vector formats.
    • Constructor Detail

      • HPlotChart

        public HPlotChart(JFreeChart jchart,                  int xsize,                  int ysize)
        Create canvas that keeps JFreeChart panel.
        Parameters:
        jchart - chart of JFreeChart.
        xsize - size in x direction
        ysize - size in y direction
      • HPlotChart

        public HPlotChart(JFreeChart jchart)
        Construct a HPlotXY canvas with a plot with the size 600x400.
        Parameters:
        jchart - Chart to be shown.
    • Method Detail

      • visible

        public void visible(boolean vs)
        Set the canvas frame visible or not
        Parameters:
        vs - (boolean) true: visible, false: not visible
      • visible

        public void visible()
        Set the canvas frame visible
      • doc

        public void doc()
        Show online documentation.
      • close

        public void close()
        Close the canvas (and dispose all components).
      • getFrame

        public JFrame getFrame()
        Get grame that keeps averything
        Returns:
        panel with image
      • getPanel

        public ChartPanel getPanel()
        Return panel with the chart.
        Returns:
        panel with chart.
      • getChart

        public JFreeChart getChart()
        Return JFreeChart
        Returns:
        chart
      • setTheme

        public void setTheme(String s)
        Set a custom theme for chart.. It can be: LEGACY_THEME, JFREE_THEME, DARKNESS_THEME
        Parameters:
        s - a theme, can be either LEGACY_THEME, JFREE_THEME, DARKNESS_THEME
      • destroy

        public void destroy()
        Remove the canvas frame
      • export

        public void export(String filename)
        Export graph into an image file. The the image format is given by extension. "png", "jpg", "eps", "pdf", "svg". In case of "eps", "pdf" and "svg", vector graphics is used.
        Parameters:
        file - name of the image
      • export

        public void export(String filename,                   int width,                   int height)
        Export graph into an image file. The the image format is given by extension. "png", "jpg", "eps", "pdf", "svg". In case of "eps", "pdf" and "svg", vector graphics is used.
        Parameters:
        filename - file name
        width - width
        height - hight
      • drawToGraphics2D

        public void drawToGraphics2D(Graphics2D g,                             int width,                             int height)

DMelt 2.7 © DataMelt by jWork.ORG