|
|||||||||
| PREV CLASS NEXT CLASS | All Classes | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectjhplot.GHPanel
jhplot.GHFrame
jhplot.HPlotXYZ
public class HPlotXYZ
Create a interactive canvas to show objects in 3D. This canvas uses the GL native libraries. Use it for showing 2D histograms (H2D class), functions (F2D), data points (P2D class).
| Field Summary | |
|---|---|
org.jzy3d.colors.Color |
currentFillColor
|
org.jzy3d.colors.Color |
currentWiredColor
|
boolean |
currentWiredrame
|
float |
currentWiredWidth
|
boolean |
set
|
boolean |
solidColor
|
| Constructor Summary | |
|---|---|
HPlotXYZ()
Construct a HGraph canvas with a plot with the default parameters 600 by 400, and 10% space for the global title "Default" |
|
HPlotXYZ(String title)
Construct a HGraph canvas with a plot with the default parameters 600 by 400, and 10% space for the global title |
|
HPlotXYZ(String title,
int xs,
int ys)
Construct a HView2D canvas with a single plot/graph |
|
HPlotXYZ(String title,
int xsize,
int ysize,
int n1,
int n2)
Create a canvas to display histograms in 3D |
|
HPlotXYZ(String title,
int xsize,
int ysize,
int n1,
int n2,
boolean set)
Create a canvas to display histograms in 3D |
|
| Method Summary | |
|---|---|
void |
add(org.jzy3d.plot3d.primitives.AbstractDrawable shape)
Add a object to the list |
org.jzy3d.plot3d.primitives.AbstractDrawable |
add(F2D h1)
Add a F2D function (a function with 2 arguments, x and y). |
org.jzy3d.plot3d.primitives.AbstractDrawable |
add(F2D h1,
int xsteps,
int ysteps)
Add a F2D function (a function with 2 arguments, x and y). |
void |
add(H2D h2d)
Show H2D histogram as bars |
void |
add(P2D h1)
Add a container with X,Y.Z values to be shown. |
void |
add(P2D h1,
Color color)
Add a container with X,Y.Z values to be shown. |
void |
add(P2D h1,
double pointSize)
Add a container with X,Y.Z values to be shown. |
org.jzy3d.plot3d.primitives.AbstractDrawable |
add(P2D h1,
double penSize,
Color color)
Draw X,Y.Z values in 3D |
void |
addAsBars(H2D h2d)
Add a H2D histogram as bars. |
org.jzy3d.plot3d.primitives.AbstractDrawable |
addAsSurface(H2D h2d)
Add a H2D histogram. |
void |
addBar(double x,
double y,
double z,
double height,
double radius)
Build a bar as a cylinder in 3D and add to the list of shapes on the current pad. |
void |
addContour(org.jzy3d.plot3d.builder.Mapper mapper,
org.jzy3d.colors.ColorMapper myColorMapper,
org.jzy3d.maths.Range xrange,
org.jzy3d.maths.Range yrange)
|
void |
addDisk(double x,
double y,
double z,
double radiusInner,
double radiusOuter,
int slices,
int loops)
Add a sphere to the current canvas. |
void |
addFlatLine(float[] x,
float[] y,
double depth)
Add a flat line to the current pad. |
void |
addLight(double x,
double y,
double z,
Color AmbiantColor,
Color DiffuseColor,
Color SpecularColor)
Add light to the scene. |
void |
addParallelepiped(float xmin,
float xmax,
float ymin,
float ymax,
float zmin,
float zmax)
Add parallelepiped to the current canvas. |
void |
addPoint(double x,
double y,
double z,
double width)
Add a point to the list of shapes on the current pad. |
void |
addPolygon(P2D p2d)
Add a flat line to the current pad. |
void |
addSphere(double x,
double y,
double z,
double radius,
double height,
int slices,
int stacks)
Add a sphere to the current canvas. |
org.jzy3d.plot3d.primitives.AbstractDrawable |
addText(String text,
double[] pos,
Color color)
Add a text to the canvas. |
void |
addTube(double x,
double y,
double z,
double radiusBottom,
double radiusTop,
double height,
int slices,
int stacks)
Add a tube to the current canvas. |
void |
clear()
Clear the current graph including graph settings. |
void |
clear(int i1,
int i2)
Clear the graph characterized by an index in X and Y. |
void |
clearAll()
Clear all graphs from data and settings. |
void |
close()
Close the canvas. |
void |
distroy()
Remove the canvas frame |
void |
doc()
Show online documentation. |
void |
draw(org.jzy3d.plot3d.primitives.AbstractDrawable[] shapes)
Draw a list of shapes on the current canvas |
void |
draw(F2D h1,
int xsteps,
int ysteps)
Draw a F2D function (a function with 2 arguments, x and y). |
void |
draw(H2D h2d)
Draw a H2D histogram. |
void |
draw(P2D h1,
double penSize,
Color color)
Draw X,Y.Z values in 3D using variable colors. |
org.jzy3d.chart.Chart |
getChart()
Get the current canvas chart. |
List<org.jzy3d.plot3d.primitives.AbstractDrawable> |
getShapeList()
Get list of shapes plotted on the current pad given by the cd() method. |
void |
quit()
exit the frame and clear all components |
void |
setAxesBox(boolean isbox)
The box can be turned on/off for the current pad. |
void |
setAxesLabel(int axis,
boolean shown)
Show or not label on axes. |
void |
setAxesLabelFont(Font font,
org.jzy3d.colors.Color color)
Set font and color for axis labels. |
void |
setAxisTick(int axis,
boolean shown)
Show or not ticks on axes. |
void |
setBackground(Color color)
Set background for the current pad. |
void |
setColorFill(Color color)
Set fill color for the current object |
void |
setColorSolid(boolean solid)
If you set true, color will be solid and no colorfull color map is used. |
void |
setColorWireframe(Color color)
Set fill color for the current object |
void |
setDistance(double distance)
Set distance to the object |
void |
setFaceDisplayed(boolean face)
Set face shown or not |
void |
setGridColor(Color color)
Set Grid color to the current pad |
void |
setLegendBar(org.jzy3d.plot3d.primitives.AbstractDrawable surface)
Set a legend to a given surface |
void |
setNameX(String a)
Set a name for X axis |
void |
setNameY(String a)
Set a name for Y axis |
void |
setNameZ(String a)
Set a name for Z axis |
void |
setRange(double minX,
double maxX,
double minY,
double maxY,
double minZ,
double maxZ)
Sets the range for the current plot |
void |
setRotationAngle(double angle)
Get the rotation angle |
void |
setScaling(double scale)
Set the scaling |
void |
setTickRenderer(int axis,
int dig)
Set scientific notation with a give number of digits |
void |
setTickRendererAll(int dig)
Set scientific notation with a give number of digits for all ticks |
void |
setViewPoint(double x,
double y,
double z)
Set view point |
void |
setWireframe(boolean wiredrame)
Set wireframe mode for the current object. |
void |
setWireframeWidth(double width)
Set width of the line for wireframe |
void |
update()
Update current pad. |
void |
update(int n1,
int n2)
Refresh only a particular pad. |
void |
updateAll()
Refresh all the plots on the same canvas. |
void |
visible()
Show the canvas |
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 boolean set
public boolean currentWiredrame
public org.jzy3d.colors.Color currentFillColor
public org.jzy3d.colors.Color currentWiredColor
public float currentWiredWidth
public boolean solidColor
| Constructor Detail |
|---|
public HPlotXYZ(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 in y
public HPlotXYZ(String title,
int xsize,
int ysize,
int n1,
int n2)
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 HPlotXYZ(String title,
int xs,
int ys)
title - Title for the canvasxs - size in xys - size in ypublic HPlotXYZ(String title)
title - Titlepublic HPlotXYZ()
| Method Detail |
|---|
public void setRange(double minX,
double maxX,
double minY,
double maxY,
double minZ,
double maxZ)
minX - Min value in XmaxX - Max value in XminY - Min value in YmaxY - Max value in YminZ - Min value in ZmaxZ - Max value in Zpublic void setDistance(double distance)
distance - distancepublic void setColorFill(Color color)
color - to fill objectpublic void setColorWireframe(Color color)
color - for wireframepublic void setWireframe(boolean wiredrame)
wiredrame - true than no solid fill is used.public void setWireframeWidth(double width)
width - widthpublic void setColorSolid(boolean solid)
solid - apply a solid color to the current objectpublic void setScaling(double scale)
scale - public void setRotationAngle(double angle)
angle - anglepublic void setFaceDisplayed(boolean face)
face - true is displayed.public void setGridColor(Color color)
color - grid colorpublic 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 distroy()
public void quit()
public void visible(boolean vs)
vs - (boolean) true: visible, false: not visiblepublic void visible()
public void setNameX(String a)
a - Name of the label for X axispublic void setNameY(String a)
a - Name of the label for Y axispublic void setNameZ(String a)
a - Name of the label for Z axis
public void setAxesLabel(int axis,
boolean shown)
axis - axis: 0 for X, 1 for Y, 2 for Zshown - true then shown.
public void setViewPoint(double x,
double y,
double z)
x - Xy - Yz - Z
public void setAxesLabelFont(Font font,
org.jzy3d.colors.Color color)
font - color -
public void setAxisTick(int axis,
boolean shown)
axis - axis: 0 for X, 1 for Y, 2 for Zshown - true then shown.public void add(P2D h1)
h1 -
public void add(P2D h1,
Color color)
h1 - color - Color of this data.
public void add(P2D h1,
double pointSize)
h1 - input datapointSize - size of the point
public void draw(P2D h1,
double penSize,
Color color)
h1 - penSize - size of the pointscolor - to show points
public org.jzy3d.plot3d.primitives.AbstractDrawable add(P2D h1,
double penSize,
Color color)
h1 - input datapenSize - size of the pointscolor - to show pointsreturn - what was added.public void add(org.jzy3d.plot3d.primitives.AbstractDrawable shape)
shape - public void draw(org.jzy3d.plot3d.primitives.AbstractDrawable[] shapes)
shapes - public void update()
public void update(int n1,
int n2)
n1 - the location of the plot in xn2 - the location of the plot in ypublic void updateAll()
public org.jzy3d.plot3d.primitives.AbstractDrawable addText(String text,
double[] pos,
Color color)
text - textpos - position (x,y,z)color - color
public org.jzy3d.plot3d.primitives.AbstractDrawable add(F2D h1)
h1 - input function for drawing.return - surface which was just added.
public org.jzy3d.plot3d.primitives.AbstractDrawable add(F2D h1,
int xsteps,
int ysteps)
h1 - input function for drawing.xsteps - - steps in X (50 is optimal)ysteps - - steps in Y (50 is optimal)return - what was added.
public void draw(F2D h1,
int xsteps,
int ysteps)
h1 - input function for drawing.xsteps - - steps in X (50 is optimal)ysteps - - steps in Y (50 is optimal)
public void addContour(org.jzy3d.plot3d.builder.Mapper mapper,
org.jzy3d.colors.ColorMapper myColorMapper,
org.jzy3d.maths.Range xrange,
org.jzy3d.maths.Range yrange)
public org.jzy3d.plot3d.primitives.AbstractDrawable addAsSurface(H2D h2d)
h2d - Histogram for drawing.return - what was addedpublic void add(H2D h2d)
h2d - input histogramreurn - what was addedpublic void addAsBars(H2D h2d)
h2d - Histogram for drawing.return - what was addedpublic void setLegendBar(org.jzy3d.plot3d.primitives.AbstractDrawable surface)
surface - input objectpublic void draw(H2D h2d)
h2d - Histogram for drawing.public org.jzy3d.chart.Chart getChart()
public void setBackground(Color color)
color -
public void setTickRenderer(int axis,
int dig)
axis - axis. 0=X, 1=Y, 2=Zdig - number of digitspublic void setTickRendererAll(int dig)
dig - number of digitspublic void setAxesBox(boolean isbox)
isbox - false is box with axes is offpublic void close()
public void doc()
public void addBar(double x,
double y,
double z,
double height,
double radius)
x - position in Xy - position in Yradius - radius
public void addPoint(double x,
double y,
double z,
double width)
x - position in Xy - position in Yz - position in Zwidth - width or sizepublic void addPolygon(P2D p2d)
p2d - array of X,Y,Z which define polygone points
public void addFlatLine(float[] x,
float[] y,
double depth)
x - position in Xy - position in Ydepth - depthcolor - color color to fill
public void addDisk(double x,
double y,
double z,
double radiusInner,
double radiusOuter,
int slices,
int loops)
x - position Xy - position Yz - position Zslices - number of vertical slices (i.e. wireframes)stacks - loops
public void addSphere(double x,
double y,
double z,
double radius,
double height,
int slices,
int stacks)
x - position Xy - position Yz - position Zradius - radius of the sphereheight - heightslices - number of vertical slices (i.e. wireframes)stacks - number of horizontal stacks (i.e. wireframes)
public void addTube(double x,
double y,
double z,
double radiusBottom,
double radiusTop,
double height,
int slices,
int stacks)
x - position Xy - position Yz - position ZradiusBottom - radius of the bottom circleradiusTop - radius of the top circleheight - height of the cylinderslices - number of vertical slices (i.e. wireframes)stacks - number of horizontal stacks (i.e. wireframes)
public void addParallelepiped(float xmin,
float xmax,
float ymin,
float ymax,
float zmin,
float zmax)
xmin - xmax - ymin - ymax - zmin - zmax -
public void addLight(double x,
double y,
double z,
Color AmbiantColor,
Color DiffuseColor,
Color SpecularColor)
x - X positiony - Y positionz - Z positionAmbiantColor - Ambiant ColorDiffuseColor - Diffuse ColorSpecularColor - Specular Colorpublic List<org.jzy3d.plot3d.primitives.AbstractDrawable> getShapeList()
|
|||||||||
| PREV CLASS NEXT CLASS | All Classes | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||