|
|||||||||
PREV CLASS NEXT CLASS | All Classes | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjhplot.GHPanel
jhplot.GHFrame
jhplot.HChart
public class HChart
Create various charts, such as pie, histograms, bar charts including 3D emulation, lines.
Field Summary | |
---|---|
static int |
IndexPlot
|
boolean |
set
|
Constructor Summary | |
---|---|
HChart()
Construct a HChart canvas with a plot with the default parameters 600 by 400, and 10% space for the global title "Default" |
|
HChart(String title)
Construct a HChart canvas with a plot with the default parameters 600 by 400, and 10% space for the global title |
|
HChart(String title,
int xs,
int ys)
Construct a HChart canvas with a single plot/graph |
|
HChart(String title,
int xs,
int ys,
boolean set)
Construct a HChart canvas with a single plot/graph |
|
HChart(String title,
int xs,
int ys,
int n1,
int n2)
Construct a HChart canvas with plots/graphs |
|
HChart(String title,
int xsize,
int ysize,
int n1,
int n2,
boolean set)
Create HChart canvas with a several chart plots |
Method Summary | |
---|---|
void |
clear()
Clear the current graph including graph settings. |
void |
clear(int i1,
int i2)
Clear the chart characterized by an index in X and Y. |
void |
clearAll()
Clear all graphs from data and settings. |
void |
clearData()
Clear plot from the data |
void |
clearPlot()
Clear plot. |
void |
close()
Close the canvas (and dispose all components) Note: a memory leak is found - no time to investigate it. |
void |
defineHistogram(String sname,
int Bins,
double Min,
double Max)
Define a histogram to fill histogram chart |
void |
destroy()
Remove the canvas frame |
void |
doc()
Show online documentation. |
void |
draw(P1D d)
Draw data from a P1D. |
Object |
geData()
Returns the current data object |
org.jfree.chart.JFreeChart |
getChart()
Returns current Chart |
org.jfree.chart.ChartPanel |
getChartPanel()
Returns current Chart panel |
void |
quit()
Quit the frame |
void |
setAutoRange()
Set autorange in X and Y at the same time |
void |
setAutoRange(boolean b)
Set auto-range in X and Y at the same time |
void |
setChartArea()
Make an Area chart. |
void |
setChartBar()
Make a Bar chart. |
void |
setChartBar3D()
Make a Bar chart in 3D. |
void |
setChartHistogram()
Make a Histogram chart |
void |
setChartLine()
Make a line chart. |
void |
setChartPie()
Make a Pie chart. |
void |
setChartPie3D()
Make a Pie 3D chart. |
void |
setChartXY()
Make a X-Y chart with data points (assuming no errors). |
void |
setFontAxisX(Font f,
Color c)
Set font and color for X-axis (for X-Y plots) |
void |
setFontAxisY(Font f,
Color c)
Set font and color for Y-axis (for X-Y plots) |
void |
setFontLegent(Font f)
Set font for legent title |
void |
setFontTitle(Font f)
Set font for legent title |
void |
setName(String title)
Set global title to the current chart. |
void |
setNameX(String s)
Sets the name for X axis. |
void |
setNameY(String s)
Sets the name for Y axis. |
void |
setRange(int axis,
double min,
double max)
Sets the range (min-max) displayed on the axis. |
void |
setTheme(String s)
Set a custom theme for chart.. |
void |
update()
Update all plots |
void |
update(int N1,
int N2)
Update the chart |
void |
valueArea(double[][] data,
String series,
String type)
Set a value to Area data set. |
void |
valueBar(double value,
String series,
String category)
Set a value to a Bar chart. |
void |
valueBar3D(double value,
String series,
String category)
Set a value to a 3D Bar chart. |
void |
valueHistogram(double[] values)
Set data to make a histogram. |
void |
valueHistogram(double[] values,
String name,
int Bins,
double Min,
double Max)
Build a histogram from an array. |
void |
valueLine(double value,
String series,
String category)
Set a value to a Line chart. |
void |
valuePie(String name,
double value)
Set a value to pie data set |
void |
valuePie3D(String name,
double value)
Set a value to 3D pie data set. |
void |
valueXY(P1D d)
Set XY data from a P1D. |
void |
valueXYerrors(P1D d)
Set XY data from a P1D. |
void |
visible()
Set the canvas frame visible |
void |
visible(boolean vs)
Set the canvas frame visible or not |
Methods inherited from class jhplot.GHFrame |
---|
addGraph, cd, componentHidden, componentMoved, componentShown, getCdX, getCdY, getFrame, getHTMLUrl, getNtotX, getNtotY, setPlotsNum, updateFrame |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static int IndexPlot
public boolean set
Constructor Detail |
---|
public HChart(String title, int xsize, int ysize, int n1, int n2, boolean set)
title
- Titlexsize
- size in x directionysize
- size in y directionn1
- number of plots/graphs in xn2
- number of plots/graphs in yset
- set or not the graphpublic HChart(String title, int xs, int ys)
title
- Title for the canvasxs
- size in xys
- size in ypublic HChart(String title, int xs, int ys, boolean set)
title
- Title for the canvasxs
- size in xys
- size in yset
- set or not the graph (boolean)public HChart(String title, int xs, int ys, int n1, int n2)
title
- Title for the canvasxs
- size in xys
- size in yn1
- number of plots/graphs in xn2
- number of plots/graphs in ypublic HChart(String title)
title
- Titlepublic HChart()
Method Detail |
---|
public void visible(boolean vs)
vs
- (boolean) true: visible, false: not visiblepublic void visible()
public void setTheme(String s)
s
- a theme, can be either LEGACY_THEME,
JFREE_THEME, DARKNESS_THEMEpublic void destroy()
public void setFontAxisX(Font f, Color c)
f
- fontc
- colorpublic void setFontAxisY(Font f, Color c)
f
- fontc
- colorpublic void setChartXY()
public void setChartArea()
public void setChartBar()
public void setChartBar3D()
public void setChartHistogram()
public void setChartLine()
public void setChartPie()
public void setChartPie3D()
public void clearPlot()
public void clearData()
public void clear()
public void clear(int i1, int i2)
i1
- location of the graph in Xi2
- location of the graph in Ypublic void clearAll()
public void update()
public void setName(String title)
title
- titlepublic void setNameX(String s)
s
- Title for X axis.public void setNameY(String s)
s
- Title for Y axis.public void valueXY(P1D d)
d
- input P1D containerpublic void valueXYerrors(P1D d)
d
- input P1D containerpublic void defineHistogram(String sname, int Bins, double Min, double Max)
sname
- NameBins
- Number of binsMin
- Min valueMax
- Max valuepublic void valueHistogram(double[] values)
values
- valued to be filledpublic void setFontLegent(Font f)
f
- public void setFontTitle(Font f)
f
- public void valueHistogram(double[] values, String name, int Bins, double Min, double Max)
values
- Values to be filledname
- NameBins
- Number of binsMin
- Min valueMax
- Max valuepublic void draw(P1D d)
d
- input P1D containerpublic void valuePie(String name, double value)
name
- Name for this numbervalue
- Numberpublic void valuePie3D(String name, double value)
name
- Name for this numbervalue
- Numberpublic void valueArea(double[][] data, String series, String type)
data
- Input dataseries
- name of seriestype
- type of seriespublic void valueBar(double value, String series, String category)
value
- Valueseries
- Seriescategory
- categorypublic void setRange(int axis, double min, double max)
axis
- defines to which axis this function applies, generally
something like X_AXIS or Y_AXIS.min
- minimum value on the axismax
- maximum value on the axispublic void setAutoRange(boolean b)
b
- if true, sets auto-rangepublic void setAutoRange()
public void valueLine(double value, String series, String category)
value
- Valueseries
- Seriescategory
- categorypublic void valueBar3D(double value, String series, String category)
value
- Valueseries
- Seriescategory
- categorypublic void update(int N1, int N2)
N1
- location in XN2
- location in Ypublic org.jfree.chart.JFreeChart getChart()
public org.jfree.chart.ChartPanel getChartPanel()
public Object geData()
public void close()
public void quit()
public void doc()
|
|||||||||
PREV CLASS NEXT CLASS | All Classes | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |