|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjhplot.GHPanel
jhplot.GHFrame
jhplot.HChart
public class HChart
Create various charts based on jFreeChart package
| Field Summary | |
|---|---|
static int |
IndexPlot
|
boolean |
set
|
| Fields inherited from class jhplot.GHFrame |
|---|
about, bar, item00, item01, item02, item03, item04, item05, item06, item11, item12, item13, mainFrame, menu, N1, N1edit, N1final, N2, N2edit, N2final |
| Fields inherited from class jhplot.GHPanel |
|---|
backMargin, bottomPanel, bottomSize, CanvasPanel, gTitleColor, gTitleFont, gTitleText, Height, leftPanel, leftSize, mainPanel, rightPanel, rightSize, topPanel, topSize, Width |
| 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 |
protected void |
ClearFrame()
Clear all the frames |
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 |
protected void |
OpenReadDataDialog()
|
protected void |
OpenReadDialog()
Open a dialog to read the file |
protected void |
OpenWriteDialog()
Open a dialog to write the file |
void |
quit()
Quit the frame |
protected void |
quitFrame()
Close the frame from menu |
protected void |
RefreshFrame()
Refresh all the frames |
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 |
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.. |
protected void |
showHelp()
quite the entire frame |
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, doNotShowFrame, getCdX, getCdY, getFrame, getHTMLUrl, getNtotX, getNtotY, removeFrame, setPlotsNum, showAbout, updateFrame |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, 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 graph
public HChart(String title,
int xs,
int ys)
title - Title for the canvasxs - size in xys - size in y
public 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 |
|---|
protected void ClearFrame()
ClearFrame in class GHFrameprotected void RefreshFrame()
RefreshFrame in class GHFrameprotected void OpenWriteDialog()
OpenWriteDialog in class GHFrameprotected void OpenReadDialog()
OpenReadDialog in class GHFramepublic 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 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 container
public 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 filled
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 container
public void valuePie(String name,
double value)
name - Name for this numbervalue - Number
public void valuePie3D(String name,
double value)
name - Name for this numbervalue - Number
public void valueArea(double[][] data,
String series,
String type)
data - Input dataseries - name of seriestype - type of series
public void valueBar(double value,
String series,
String category)
value - Valueseries - Seriescategory - category
public 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 - category
public void valueBar3D(double value,
String series,
String category)
value - Valueseries - Seriescategory - category
public 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()
protected void quitFrame()
quitFrame in class GHFrameprotected void showHelp()
GHFrame
showHelp in class GHFrameprotected void OpenReadDataDialog()
OpenReadDataDialog in class GHFrame
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||