jhplot
Class HPlotJas
- java.lang.Object
-
- jhplot.HPlotJas
-
public class HPlotJas extends java.lang.ObjectCreate a canvas using the JAS plotter API. It has different look & feel than HPlot. Can also be used to show data, histograms, functions, 2D density plots. Several plot regions can be used.This API allows to perform an interactive fit after loading the data and rebin one-dimenstional arrays.
-
-
Constructor Summary
Constructors Constructor and Description HPlotJas()Construct a HPlot canvas with a single plot with the size 600x400.HPlotJas(java.util.ArrayList<java.lang.Object> olist)Construct a Jas frame and prepare for plotting.HPlotJas(java.lang.String title)Construct a Jas canvas with a plot with the size 600x400.HPlotJas(java.lang.String title, java.util.ArrayList<java.lang.Object> olist)Construct a Jas frame and prepare for plotting.HPlotJas(java.lang.String title, int xsize, int ysize, java.util.ArrayList<java.lang.Object> olist)Create HPlot canvas with several plots.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method and Description voidadd(java.util.ArrayList data)Add all data as a list.voidclose()Close the canvas (and dispose all components).voiddoc()Show online documentation.voiddraw(H1D h1)Plot 1D histogram.voidexport(java.lang.String file)Fast export of the canvas to an image file.java.lang.StringgetTitle()Return title of this plotter.static voidmain(java.lang.String[] args)voidupdate()Update the current canvas.voidvisible()Set the canvas frame visiblevoidvisible(boolean vs)Set the canvas frame visible or not
-
-
-
Constructor Detail
-
HPlotJas
public HPlotJas(java.lang.String title, int xsize, int ysize, java.util.ArrayList<java.lang.Object> olist)Create HPlot canvas with several plots.- Parameters:
title- Titlexsize- size in x directionysize- size in y directionolist- List of objects for drawing, such as P0D, P1D, P0I, H1D, H2P.
-
HPlotJas
public HPlotJas(java.lang.String title, java.util.ArrayList<java.lang.Object> olist)Construct a Jas frame and prepare for plotting.- Parameters:
title- Titlelist- list of objects to plot (H1D,P0D,P1D, etc)
-
HPlotJas
public HPlotJas(java.util.ArrayList<java.lang.Object> olist)
Construct a Jas frame and prepare for plotting.- Parameters:
list- list of objects to plot (H1D,P0D,P1D, etc)
-
HPlotJas
public HPlotJas(java.lang.String title)
Construct a Jas canvas with a plot with the size 600x400.- Parameters:
title- Title
-
HPlotJas
public HPlotJas()
Construct a HPlot canvas with a single plot with the size 600x400.
-
-
Method Detail
-
add
public void add(java.util.ArrayList data)
Add all data as a list. Supported types are O0D, P1D, H1D. H2D, P1D, IFunction1D- Parameters:
data- list with input objects
-
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
-
update
public void update()
Update the current canvas.
-
export
public void export(java.lang.String file)
Fast export of the canvas to an image file. This depends on the extension:
SVG - Scalable Vector Graphics (SVG)
SVGZ - compressed SVG
JPG
PNG
PDF
EPS
PS.
Note: EPS, PDF and PS are derived from SVG. Use SVGZ to have smaller file sizes.No questions will be asked and existing file will be rewritten
- Parameters:
file- Output file with the proper extension (SVG, SVGZ, JPG, PNG, PDF, EPS, PS). If no extension, PNG file is assumed.
-
doc
public void doc()
Show online documentation.
-
getTitle
public java.lang.String getTitle()
Return title of this plotter.- Returns:
-
close
public void close()
Close the canvas (and dispose all components).
-
draw
public void draw(H1D h1)
Plot 1D histogram. Use external graphical options from Jaida.- Parameters:
h1- Input H1D histogramstyle- Plotter style.
-
main
public static void main(java.lang.String[] args)
-
-
DMelt 3.0 © DataMelt by jWork.ORG