Class Plotter

java.lang.Object
org.tweetyproject.commons.Plotter

public class Plotter extends Object
A class for managing and displaying several plots in a single frame
Author:
Benedikt Knopp
  • Constructor Summary

    Constructors
    Constructor
    Description
    Create a new instance
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    add(JPanel panel)
    Add a sub-plot the the frame
    void
    Add some description to the frame
    void
    createFrame(int frameWidth, int frameHeight)
    Create a new main frame with specific proportions
     
    int
    Get the horizontal gap between panels
    int
    Get the vertical gap between panels
    void
    Show the frame after adding some plots

    Methods inherited from class java.lang.Object

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

    • Plotter

      public Plotter()
      Create a new instance
  • Method Details

    • createFrame

      public void createFrame(int frameWidth, int frameHeight)
      Create a new main frame with specific proportions
      Parameters:
      frameWidth - the width of the frame
      frameHeight - the height of the frame
    • show

      public void show()
      Show the frame after adding some plots
    • getFrame

      public JFrame getFrame()
      Returns:
      the frame
    • add

      public void add(JPanel panel)
      Add a sub-plot the the frame
      Parameters:
      panel - the panel containing the sub-plot
    • getHGap

      public int getHGap()
      Get the horizontal gap between panels
      Returns:
      the horizontal gap
    • getVGap

      public int getVGap()
      Get the vertical gap between panels
      Returns:
      the vertical gap
    • addLabels

      public void addLabels(List<String> labels)
      Add some description to the frame
      Parameters:
      labels - a list of strings that will be aligned vertically