|
|||||||||
| 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 |
add(F1D f1)
Add a F1D function to the canvas. |
void |
add(H1D h1)
Add a H1D histogram to the chart. |
void |
add(P1D d)
Draw data from a P1D. |
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 |
destroy()
Remove the canvas frame |
void |
doc()
Show online documentation. |
void |
draw(ArrayList<Double> x,
ArrayList<Double> y)
Draw X-Y data from arrays |
void |
draw(double[] x,
double[] y)
Draw X-Y data from arrays |
void |
draw(F1D f1)
Draw a F1D function on the canvas. |
void |
draw(H1D f1)
Draw a H1D histogram on the canvas. |
boolean |
getAntiAlias()
Get antialiasing for the graphics of the current plot |
org.jfree.chart.axis.ValueAxis |
getAxis(int axis)
Get the axis |
org.jfree.chart.axis.Axis |
getAxisX()
Get X-axis |
org.jfree.chart.axis.Axis |
getAxisY()
Get Y-axis |
org.jfree.chart.JFreeChart |
getChart()
Returns current Chart |
org.jfree.chart.ChartPanel |
getChartPanel()
Returns current Chart panel |
Color |
getLabelColor()
Get label color. |
org.jfree.chart.plot.XYPlot |
getPlot()
Get XY plot |
Color |
getTickColor()
Get color of ticks. |
Font |
getTickFont()
Get font of ticks. |
void |
quit()
Quit the frame |
void |
setAntiAlias(boolean setit)
Set antialiasing for the graphics of the current plot |
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 |
setAxis(int axis,
org.jfree.chart.axis.ValueAxis a)
Sets axis |
void |
setBackgColor(Color color)
Sets the actual background color of the entire graph panel. |
void |
setChartArea()
Make an Area chart. |
void |
setChartBar()
Make a Bar chart. |
void |
setChartBar3D()
Make a Bar chart in 3D. |
void |
setChartLine()
Make a line chart. |
void |
setChartLine(double stroke)
Make a line chart. |
void |
setChartPie()
Make a Pie chart. |
void |
setChartPie3D()
Make a Pie 3D chart. |
void |
setChartPolar()
Make a chart using polar coordinates. |
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 legend title |
void |
setFontTitle(Font f)
Set font for legend title |
void |
setGrid(boolean b)
Sets whether or not using grid lines. |
void |
setGrid(int axis,
boolean b)
Sets whether or not using grid lines. |
void |
setGridColor(Color c)
Sets color of the grid lines for all plots on the same canvas |
void |
setGridPenWidth(double width)
Sets width of the line for the grid |
void |
setGridPenWidth(int axis,
double width)
Sets the width of the line for grid |
void |
setLabelColor(Color labelColor)
Se5t color of the lebales. |
void |
setLabelFont(Font font)
Set fonts of the labels. |
void |
setLegend(boolean b)
Sets whether or not this line style should draw the name in the legend of the graph. |
void |
setLegendPosition(org.jfree.ui.RectangleEdge e)
Legend position |
void |
setLogScale(int axis,
boolean b)
Sets true or false to plot on a log scale. |
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 |
setTickColor(int axis,
Color tickColor)
Set tick color |
void |
setTickFont(Font tickFont)
Set font of ticks |
void |
update()
Update all plots |
void |
update(int N1,
int N2)
Update the chart |
void |
valueArea(double value,
String series,
String category)
Set a value to a area chart. |
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 |
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 |
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 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 |
|---|
public void setLabelColor(Color labelColor)
labelColor - public void setLabelFont(Font font)
font - public Color getLabelColor()
public void setTickColor(int axis,
Color tickColor)
tickColor - public Color getTickColor()
public void setTickFont(Font tickFont)
tickFont - public Font getTickFont()
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 - color
public void setFontAxisY(Font f,
Color c)
f - fontc - colorpublic void setChartArea()
public void setChartBar()
public void setChartBar3D()
public void setChartLine()
public void setChartLine(double stroke)
stroke - stroke width to draw the linepublic void setChartPie()
public void setChartPie3D()
public void setChartPolar()
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 setLogScale(int axis,
boolean b)
axis - defines to which axis this function applies, generally
something like X_AXIS or Y_AXIS.b - toggle, true if the scaling is logarithmic
public void setAxis(int axis,
org.jfree.chart.axis.ValueAxis a)
axis - defines to which axis this function applies. 0 means X aaxis, 1 means Y axis.a - axis objectpublic org.jfree.chart.axis.ValueAxis getAxis(int axis)
axis - defines to which axis this function applies. 0 means X aaxis, 1 means Y axis.public void setFontLegent(Font f)
f - public void setFontTitle(Font f)
f -
public void draw(double[] x,
double[] y)
x - X valuesy - Y valuespublic void draw(F1D f1)
f1d - F1D functionpublic void draw(H1D f1)
f1d - H1D histogramspublic void add(F1D f1)
f1d - F1D functionpublic void add(H1D h1)
h1 - H1D histogram
public void draw(ArrayList<Double> x,
ArrayList<Double> y)
x - X valuesy - Y valuespublic void setLegendPosition(org.jfree.ui.RectangleEdge e)
e - public void setLegend(boolean b)
b - true if the name should be shownpublic void add(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 valueBar(double value,
String series,
String category)
value - Valueseries - Seriescategory - category
public void valueArea(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 setAntiAlias(boolean setit)
setit - true if antialiasing is setpublic boolean getAntiAlias()
public void setGrid(boolean b)
b - true if shown
public void setGrid(int axis,
boolean b)
axis - defines to which axis this function applies. 0 means X axis, y means y axisb - toggle, true if the the grid should be drawn.public void setGridColor(Color c)
c - Colorpublic void setGridPenWidth(double width)
c - width of the line
public void setGridPenWidth(int axis,
double width)
axis - 0 is X axcis, 1 is Y axiswidth - with of the linepublic void setBackgColor(Color color)
color - New background color.
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.axis.Axis getAxisX()
public org.jfree.chart.axis.Axis getAxisY()
public org.jfree.chart.plot.XYPlot getPlot()
public org.jfree.chart.ChartPanel getChartPanel()
public void close()
public void quit()
public void doc()
|
|||||||||
| PREV CLASS NEXT CLASS | All Classes | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||