本文整理汇总了Java中org.math.plot.Plot3DPanel类的典型用法代码示例。如果您正苦于以下问题:Java Plot3DPanel类的具体用法?Java Plot3DPanel怎么用?Java Plot3DPanel使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
Plot3DPanel类属于org.math.plot包,在下文中一共展示了Plot3DPanel类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: main
import org.math.plot.Plot3DPanel; //导入依赖的package包/类
public static void main(String[] args) {
Plot3DPanel p = new Plot3DPanel();
Object[][] XYZ = new Object[8][3];
Object[][] XYZ2 = new Object[10][3];
for (int j = 0; j < XYZ.length; j++) {
XYZ[j][0] = Math.random();
XYZ[j][1] = Math.random();
XYZ[j][2] = "" + ((char) ('a' + j));
}
for (int j = 0; j < XYZ2.length; j++) {
XYZ2[j][0] = Math.random();
XYZ2[j][1] = Math.random();
XYZ2[j][2] = "" + ((char) ('a' + j));
}
p.addScatterPlot("toto", p.mapData(XYZ));
p.addScatterPlot("toti", p.mapData(XYZ2));
p.setAxisScale(1, "log");
new FrameView(p).setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
HashMap<String, Double> arg = p.getAxis(2).getStringMap();
Collection<Double> ouch = arg.values();
Iterator<Double> it = ouch.iterator();
while (it.hasNext()) {
System.out.println(it.next());
}
}
开发者ID:Cvarier,项目名称:2D-Elliptic-Mesh-Generator,代码行数:30,代码来源:Axis.java
示例2: main
import org.math.plot.Plot3DPanel; //导入依赖的package包/类
public static void main(String[] args) {
Plot3DPanel plotpanel = new Plot3DPanel();
for (int i = 0; i < 1; i++) {
double[][] receiverXYZ = new double[100][6];
for (int j = 0; j < receiverXYZ.length; j++) {
receiverXYZ[j][0] = /*1 + */ Math.random();
receiverXYZ[j][1] = /*100 * */ Math.random();
receiverXYZ[j][2] = /*100 * */ Math.random();
receiverXYZ[j][3] = /*1 + */ Math.random() / 10;
receiverXYZ[j][4] = /*100 * */ Math.random() / 10;
receiverXYZ[j][5] = /*100 * */ Math.random() / 10;
}
int receiverPlotDataIndex = plotpanel.addBoxPlot("Receivers", Color.orange, receiverXYZ);
}
plotpanel.setLegendOrientation(PlotPanel.SOUTH);
new FrameView(plotpanel).setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
}
开发者ID:Cvarier,项目名称:2D-Elliptic-Mesh-Generator,代码行数:19,代码来源:BoxPlot3D.java
示例3: main
import org.math.plot.Plot3DPanel; //导入依赖的package包/类
public static void main(String[] args) {
Plot3DPanel p = new Plot3DPanel();
//triangular random cloud (as sum of two uniform random numbers)
double[][] cloud = new double[100][3];
for (int i = 0; i < cloud.length; i++) {
cloud[i][0] = Math.random() + Math.random();
cloud[i][1] = Math.random() + Math.random();
cloud[i][2] = Math.random() + Math.random();
}
p.addCloudPlot("cloud", Color.RED, cloud, 3, 3, 3);
double[][] cloud2 = new double[100][3];
for (int i = 0; i < cloud.length; i++) {
cloud2[i][0] = 2 + Math.random() + Math.random();
cloud2[i][1] = 2 + Math.random() + Math.random();
cloud2[i][2] = 2 + Math.random() + Math.random();
}
p.addCloudPlot("cloud2", Color.RED, cloud2, 3, 3, 3);
p.setLegendOrientation(PlotPanel.SOUTH);
new FrameView(p).setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
}
开发者ID:Cvarier,项目名称:2D-Elliptic-Mesh-Generator,代码行数:24,代码来源:CloudPlot3D.java
示例4: done
import org.math.plot.Plot3DPanel; //导入依赖的package包/类
@Override
public void done() {
lock=true;
try {
if(!this.isCancelled()) {
publish("Processing done in "+getTime());
Plot3DPanel pd = get();
spUp.setLeftComponent(pd);
spUp.setDividerLocation(getWidth() - 300);
progressMonitor.close();
}
elecStat.setText("Electrical Values loaded: "+((int)mm.getWeight()));
// compStat.setText("Number of components: "+mm.totalComponents());
topStat.setText("Top level components: "+mm.getTopLevelComp());
} catch (Exception ex){
ex.printStackTrace();
}
}
开发者ID:kevoree,项目名称:kevoree-brain,代码行数:19,代码来源:TestMixtureGui.java
示例5: update
import org.math.plot.Plot3DPanel; //导入依赖的package包/类
@Override
public void update() {
if (getAxis(0) != -1 && getAxis(1) != -1) {
getPlotPanel().removeAllPlots();
int totalNumberOfColumns = countColumns();
for (int currentVariable = 0; currentVariable < totalNumberOfColumns; currentVariable++) {
if (getPlotColumn(currentVariable)) {
DataTable table = getDataTable();
synchronized (table) {
Iterator<DataTableRow> iterator = table.iterator();
int i = 0;
double[][] data = new double[getDataTable().getNumberOfRows()][3];
while (iterator.hasNext()) {
DataTableRow row = iterator.next();
data[i][0] = row.getValue(getAxis(0));
data[i][1] = row.getValue(getAxis(1));
data[i][2] = row.getValue(currentVariable);
if (Double.isNaN(data[i][0]) || Double.isNaN(data[i][1]) || Double.isNaN(data[i][2])) {
data[i][0] = 0.0d;
data[i][1] = 0.0d;
data[i][2] = 0.0d;
}
i++;
}
// PlotPanel construction
Color color = getColorProvider().getPointColor(
(double) (currentVariable + 1) / (double) totalNumberOfColumns);
((Plot3DPanel) getPlotPanel()).addScatterPlot(getDataTable().getColumnName(currentVariable), color,
data);
}
}
}
} else {
getPlotPanel().removeAllPlots();
}
}
开发者ID:transwarpio,项目名称:rapidminer,代码行数:37,代码来源:ScatterPlot3D.java
示例6: update
import org.math.plot.Plot3DPanel; //导入依赖的package包/类
@Override
public void update() {
if (getAxis(0) != -1 && getAxis(1) != -1) {
getPlotPanel().removeAllPlots();
int totalNumberOfColumns = countColumns();
for (int currentVariable = 0; currentVariable < totalNumberOfColumns; currentVariable++) {
if (getPlotColumn(currentVariable)) {
DataTable table = getDataTable();
synchronized (table) {
Iterator iterator = table.iterator();
int i = 0;
double[][] data = new double[getDataTable().getNumberOfRows()][3];
while (iterator.hasNext()) {
DataTableRow row = (DataTableRow) iterator.next();
data[i][0] = row.getValue(getAxis(0));
if (Double.isNaN(data[i][0])) {
data[i][0] = 0.0d;
}
data[i][1] = row.getValue(getAxis(1));
if (Double.isNaN(data[i][1])) {
data[i][1] = 0.0d;
}
data[i][2] = row.getValue(currentVariable);
if (Double.isNaN(data[i][2])) {
data[i][2] = 0.0d;
}
i++;
}
// PlotPanel construction
Color color = getColorProvider().getPointColor(
(double) (currentVariable + 1) / (double) totalNumberOfColumns);
((Plot3DPanel) getPlotPanel())
.addBarPlot(getDataTable().getColumnName(currentVariable), color, data);
}
}
}
} else {
getPlotPanel().removeAllPlots();
}
}
开发者ID:transwarpio,项目名称:rapidminer,代码行数:41,代码来源:SticksPlot3D.java
示例7: setPlotAxisProperties
import org.math.plot.Plot3DPanel; //导入依赖的package包/类
private void setPlotAxisProperties()
{
((Plot3DPanel)plot).setFixedBounds(0, 0, 100);
((Plot3DPanel)plot).setFixedBounds(1, 0, 1);
((Plot3DPanel)plot).setFixedBounds(2, 0, 1);
((Plot3DPanel)plot).getAxis(0).setLabelFont(axisFont);
((Plot3DPanel)plot).getAxis(1).setLabelFont(axisFont);
((Plot3DPanel)plot).getAxis(2).setLabelFont(axisFont);
((Plot3DPanel)plot).getAxis(0).setLightLabelFont(axisLightFont);
((Plot3DPanel)plot).getAxis(1).setLightLabelFont(axisLightFont);
((Plot3DPanel)plot).getAxis(2).setLightLabelFont(axisLightFont);
}
开发者ID:amherag,项目名称:intuitionistic-fis,代码行数:13,代码来源:JMathPlotter.java
示例8: plotControlSurface
import org.math.plot.Plot3DPanel; //导入依赖的package包/类
/**
*
* @param plotName The name of the plot
* @param xyzLabels Labels for each axis in order
* @param x The array of x discretisations
* @param y The array of y discretisations
* @param z The z values for the given number of x-y combinations
* @param yAxisRange The desired range for the yAxis
* @param plotNaNasZero If true, then the provided z array will be check for NaN values which will be replaced with 0 for plotting.
* This is useful for example when a fuzzy inference system does not contain fuzzy sets for the whole input range, i.e. outputs are undefined
* for parts of the input space.
*/
public void plotControlSurface(String plotName, String[] xyzLabels, double[] x, double[] y, double[][] z, Tuple yAxisRange, boolean plotNaNasZero)
{
plot = new Plot3DPanel("SOUTH");
((Plot3DPanel)plot).setFont(legendFont);
// add grid plot to the PlotPanel
//spec legend
int id = ((Plot3DPanel)plot).addGridPlot(plotName, x, y, z);
((Plot3DPanel)plot).getAxis(0).setLabelFont(axisFont);
((Plot3DPanel)plot).getAxis(0).setLightLabelFont(axisLightFont);
//((Plot3DPanel)plot).getAxis(0)
((Plot3DPanel)plot).getAxis(0).setLabelText(xyzLabels[0]);
((Plot3DPanel)plot).getAxis(1).setLabelFont(axisFont);
((Plot3DPanel)plot).getAxis(1).setLightLabelFont(axisLightFont);
((Plot3DPanel)plot).getAxis(1).setLabelText(xyzLabels[1]);
((Plot3DPanel)plot).getAxis(2).setLabelFont(axisFont);
((Plot3DPanel)plot).getAxis(2).setLightLabelFont(axisLightFont);
((Plot3DPanel)plot).getAxis(2).setLabelText(xyzLabels[2]);
//check and fix the z values if desired:
if(plotNaNasZero)
for(int i=0;i<x.length;i++)
{
for (int j=0;j<y.length;j++)
{
if(Double.isNaN(z[j][i]))
z[j][i] = 0.0;
}
}
((Plot3DPanel)plot).setFixedBounds(2,yAxisRange.getLeft(), yAxisRange.getRight());
title = plotName;
}
开发者ID:amherag,项目名称:intuitionistic-fis,代码行数:50,代码来源:JMathPlotter.java
示例9: show3DPlot
import org.math.plot.Plot3DPanel; //导入依赖的package包/类
public static void show3DPlot(DoubleMatrix2D proj, int[] groups, String[] names) {
org.math.plot.Plot3DPanel plotpanel = new Plot3DPanel();
ColorPalette cp = ColorPalette.NEUTRAL_PALETTE;
int idx = 0;
int currGroup;
double[][] projD = proj.toArray();
while (idx < groups.length) {
double[] avgGroup = new double[proj.columns()];
int grpSize = 0;
currGroup = groups[idx];
ArrayList<double[]> groupVec = new ArrayList<>();
while (idx < groups.length && groups[idx] == currGroup) {
groupVec.add(projD[idx]);
idx++;
}
if (idx < groups.length) {
plotpanel.addScatterPlot(names[idx].split("_")[0], cp.getColor(currGroup), groupVec.toArray(new double[groupVec.size()][]));
}
}
JFrame jf = new JFrame();
plotpanel.removeLegend();
plotpanel.plotLegend.getParent();
plotpanel.remove(plotpanel.plotLegend);
plotpanel.removeLegend();
plotpanel.plotLegend = new LegendPanel(plotpanel, 0);
plotpanel.add(plotpanel.plotLegend, BorderLayout.EAST);
jf.add(plotpanel);
jf.setBounds(200, 200, 800, 600);
jf.setVisible(true);
}
开发者ID:nolanlab,项目名称:vortex,代码行数:45,代码来源:Trajectories_Correl.java
示例10: update
import org.math.plot.Plot3DPanel; //导入依赖的package包/类
@Override
public void update() {
if (getAxis(0) != -1 && getAxis(1) != -1) {
getPlotPanel().removeAllPlots();
int totalNumberOfColumns = countColumns();
for (int currentVariable = 0; currentVariable < totalNumberOfColumns; currentVariable++) {
if (getPlotColumn(currentVariable)) {
DataTable table = getDataTable();
synchronized (table) {
int i = 0;
double[][] data = new double[getDataTable().getNumberOfRows()][3];
for (DataTableRow row : table) {
data[i][0] = row.getValue(getAxis(0));
if (Double.isNaN(data[i][0])) {
data[i][0] = 0.0d;
}
data[i][1] = row.getValue(getAxis(1));
if (Double.isNaN(data[i][1])) {
data[i][1] = 0.0d;
}
data[i][2] = row.getValue(currentVariable);
if (Double.isNaN(data[i][2])) {
data[i][2] = 0.0d;
}
i++;
}
// PlotPanel construction
Color color = getColorProvider().getPointColor(
(double) (currentVariable + 1) / (double) totalNumberOfColumns);
((Plot3DPanel) getPlotPanel())
.addBarPlot(getDataTable().getColumnName(currentVariable), color, data);
}
}
}
} else {
getPlotPanel().removeAllPlots();
}
}
开发者ID:rapidminer,项目名称:rapidminer-studio,代码行数:39,代码来源:SticksPlot3D.java
示例11: plot3D
import org.math.plot.Plot3DPanel; //导入依赖的package包/类
/**
* draws a 3D plot
* @param xs x-coordinates
* @param ys y-coordinates
* @param zs z-coordinates
*/
public static void plot3D(double [] xs, double [] ys, double [][] zs) {
JFrame frame = createFrame("Plot 3D");
Plot3DPanel panel = new Plot3DPanel();
panel.addGridPlot("plot", Color.BLUE, xs, ys, zs);
frame.getContentPane().add(panel);
frame.setVisible(true);
}
开发者ID:akmaier,项目名称:CONRAD,代码行数:14,代码来源:PlotHelper.java
示例12: emptyPlot
import org.math.plot.Plot3DPanel; //导入依赖的package包/类
private Plot3DPanel emptyPlot(){
Plot3DPanel plot = new Plot3DPanel("SOUTH");
plot.setAxisLabel(0,"Time");
plot.setAxisLabel(1,"Electric load");
plot.setAxisLabel(2,"Probability");
return plot;
}
开发者ID:kevoree,项目名称:kevoree-brain,代码行数:9,代码来源:TestMixtureGui.java
示例13: Grafica3D
import org.math.plot.Plot3DPanel; //导入依赖的package包/类
public Grafica3D(){
double []x =increment(-1.0,0.1,1.0);
double [] y =increment(-1.0,0.1,1.0);
double [][] z= f(x,y);
double [][] z2= f2(x,y);
Plot3DPanel grafica3D = new Plot3DPanel("SOUTH");
grafica3D.addGridPlot("Graficas Trabajadores",x,y,z);
grafica3D.addGridPlot("Graficas Trabajadores",x,y,z2);
JFrame frame = new JFrame("Graficacion 3D");
frame.setSize(500,500);
frame.setContentPane(grafica3D);
frame.setDefaultCloseOperation(frame.getDefaultCloseOperation());
frame.setVisible(true);
}
开发者ID:2M3-IS,项目名称:trabajadores-app,代码行数:16,代码来源:Grafica3D.java
示例14: addBase3dPanel
import org.math.plot.Plot3DPanel; //导入依赖的package包/类
protected void addBase3dPanel() {
GridBagLayout gbl_plotPanel = (GridBagLayout)plotPanel.getLayout();
gbl_plotPanel.columnWidths = new int[] {0, 0};
gbl_plotPanel.columnWeights = new double[]{1.0, 1.0};
newPlot3d = new Plot3DPanel("SOUTH") {
private static final long serialVersionUID = 7914951068593204419L;
public void addPlotToolBar(String location) {
super.addPlotToolBar(location);
super.plotToolBar.remove(7);
super.plotToolBar.remove(5);
super.plotToolBar.remove(4);
}
};
newPlot3d.setAutoBounds();
newPlot3d.setAutoscrolls(true);
newPlot3d.setEditable(false);
newPlot3d.setBorder(BorderFactory.createLineBorder(Color.BLACK));
newPlot3d.setForeground(Color.BLACK);
newPlot3d.getAxis(0).setColor(Color.BLACK);
newPlot3d.getAxis(1).setColor(Color.BLACK);
newPlot3d.getAxis(2).setColor(Color.BLACK);
newPlot3d.setAxisLabel(0, x3dAxisName);
newPlot3d.setAxisLabel(1, y3dAxisName);
newPlot3d.setAxisLabel(2, z3dAxisName);
GridBagConstraints gbl_chartPanel = new GridBagConstraints();
gbl_chartPanel.anchor = GridBagConstraints.CENTER;
gbl_chartPanel.insets = insets3;
gbl_chartPanel.fill = GridBagConstraints.BOTH;
gbl_chartPanel.gridx = 0;
gbl_chartPanel.gridy = 0;
plotPanel.add(plot3d, gbl_chartPanel);
gbl_chartPanel.gridx = 1;
plotPanel.add(newPlot3d, gbl_chartPanel);
}
开发者ID:vimsh,项目名称:mafscaling,代码行数:37,代码来源:TableRescale.java
示例15: create3dGraphTab
import org.math.plot.Plot3DPanel; //导入依赖的package包/类
protected void create3dGraphTab() {
plotPanel = new JPanel();
add(plotPanel, "<html><div style='text-align: center;'>3<br>D<br><br>C<br>h<br>a<br>r<br>t</div></html>");
GridBagLayout gbl_plotPanel = new GridBagLayout();
gbl_plotPanel.columnWidths = new int[] {0};
gbl_plotPanel.rowHeights = new int[] {0};
gbl_plotPanel.columnWeights = new double[]{1.0};
gbl_plotPanel.rowWeights = new double[]{1.0};
plotPanel.setLayout(gbl_plotPanel);
plot3d = new Plot3DPanel("SOUTH") {
private static final long serialVersionUID = 7914951068593204419L;
public void addPlotToolBar(String location) {
super.addPlotToolBar(location);
super.plotToolBar.remove(7);
super.plotToolBar.remove(5);
super.plotToolBar.remove(4);
}
};
plot3d.setAutoBounds();
plot3d.setAutoscrolls(true);
plot3d.setEditable(false);
plot3d.setBorder(BorderFactory.createLineBorder(Color.BLACK));
plot3d.setForeground(Color.BLACK);
plot3d.getAxis(0).setColor(Color.BLACK);
plot3d.getAxis(1).setColor(Color.BLACK);
plot3d.getAxis(2).setColor(Color.BLACK);
plot3d.setAxisLabel(0, x3dAxisName);
plot3d.setAxisLabel(1, y3dAxisName);
plot3d.setAxisLabel(2, z3dAxisName);
GridBagConstraints gbl_chartPanel = new GridBagConstraints();
gbl_chartPanel.anchor = GridBagConstraints.CENTER;
gbl_chartPanel.insets = insets3;
gbl_chartPanel.fill = GridBagConstraints.BOTH;
gbl_chartPanel.gridx = 0;
gbl_chartPanel.gridy = 0;
plotPanel.add(plot3d, gbl_chartPanel);
}
开发者ID:vimsh,项目名称:mafscaling,代码行数:40,代码来源:ACompCalc.java
示例16: update
import org.math.plot.Plot3DPanel; //导入依赖的package包/类
@Override
public void update() {
if (getAxis(0)!= -1&& getAxis(1)!= -1 && getAxis(2) != -1) {
getPlotPanel().removeAllPlots();
int totalNumberOfColumns = countColumns();
for (int currentVariable = 0; currentVariable < totalNumberOfColumns; currentVariable ++){
if (getPlotColumn(currentVariable)) {
DataTable table = getDataTable();
synchronized (table) {
Iterator iterator = table.iterator();
int i = 0;
double[][] data = new double[getDataTable().getNumberOfRows()][3];
double[][] deviation = new double[getDataTable().getNumberOfRows()][3];
while (iterator.hasNext()) {
DataTableRow row = (DataTableRow) iterator.next();
data[i][0] = row.getValue(getAxis(0));
if (Double.isNaN(data[i][0]))
data[i][0] = 0.0d;
data[i][1] = row.getValue(getAxis(1));
if (Double.isNaN(data[i][1]))
data[i][1] = 0.0d;
data[i][2] = row.getValue(currentVariable);
if (Double.isNaN(data[i][2]))
data[i][2] = 0.0d;
deviation[i][0] = deviation[i][1] = deviation[i][2] = row.getValue(currentVariable);
if (Double.isNaN(deviation[i][0]))
deviation[i][0] = deviation[i][1] = deviation[i][2] = 0.0d;
i++;
}
// PlotPanel construction
Color color = getColorProvider().getPointColor((double)(currentVariable + 1) / (double)totalNumberOfColumns);
((Plot3DPanel)getPlotPanel()).addBoxPlot(getDataTable().getColumnName(currentVariable), color, data, deviation);
}
}
}
}
}
开发者ID:rapidminer,项目名称:rapidminer-5,代码行数:38,代码来源:BoxPlot3D.java
示例17: update
import org.math.plot.Plot3DPanel; //导入依赖的package包/类
@Override
public void update() {
if (getAxis(0)!= -1&& getAxis(1)!= -1) {
getPlotPanel().removeAllPlots();
int totalNumberOfColumns = countColumns();
for (int currentVariable = 0; currentVariable < totalNumberOfColumns; currentVariable ++){
if (getPlotColumn(currentVariable)) {
DataTable table = getDataTable();
synchronized (table) {
Iterator<DataTableRow> iterator = table.iterator();
int i = 0;
double[][] data = new double[getDataTable().getNumberOfRows()][3];
while (iterator.hasNext()) {
DataTableRow row = iterator.next();
data[i][0] = row.getValue(getAxis(0));
data[i][1] = row.getValue(getAxis(1));
data[i][2] = row.getValue(currentVariable);
if (Double.isNaN(data[i][0]) || Double.isNaN(data[i][1]) || Double.isNaN(data[i][2])) {
data[i][0] = 0.0d;
data[i][1] = 0.0d;
data[i][2] = 0.0d;
}
i++;
}
// PlotPanel construction
Color color = getColorProvider().getPointColor((double)(currentVariable + 1) / (double)totalNumberOfColumns);
((Plot3DPanel)getPlotPanel()).addScatterPlot(getDataTable().getColumnName(currentVariable), color, data);
}
}
}
}
}
开发者ID:rapidminer,项目名称:rapidminer-5,代码行数:33,代码来源:ScatterPlot3D.java
示例18: update
import org.math.plot.Plot3DPanel; //导入依赖的package包/类
@Override
public void update() {
if (getAxis(0)!= -1&& getAxis(1)!= -1) {
getPlotPanel().removeAllPlots();
int totalNumberOfColumns = countColumns();
for (int currentVariable = 0; currentVariable < totalNumberOfColumns; currentVariable ++){
if (getPlotColumn(currentVariable)) {
DataTable table = getDataTable();
synchronized (table) {
Iterator iterator = table.iterator();
int i = 0;
double[][] data = new double[getDataTable().getNumberOfRows()][3];
while (iterator.hasNext()) {
DataTableRow row = (DataTableRow) iterator.next();
data[i][0] = row.getValue(getAxis(0));
if (Double.isNaN(data[i][0]))
data[i][0] = 0.0d;
data[i][1] = row.getValue(getAxis(1));
if (Double.isNaN(data[i][1]))
data[i][1] = 0.0d;
data[i][2] = row.getValue(currentVariable);
if (Double.isNaN(data[i][2]))
data[i][2] = 0.0d;
i++;
}
// PlotPanel construction
Color color = getColorProvider().getPointColor((double)(currentVariable + 1) / (double)totalNumberOfColumns);
((Plot3DPanel)getPlotPanel()).addBarPlot(getDataTable().getColumnName(currentVariable), color, data);
}
}
}
}
}
开发者ID:rapidminer,项目名称:rapidminer-5,代码行数:34,代码来源:SticksPlot3D.java
示例19: update
import org.math.plot.Plot3DPanel; //导入依赖的package包/类
@Override
public void update() {
if (getAxis(0) != -1 && getAxis(1) != -1 && getAxis(2) != -1) {
getPlotPanel().removeAllPlots();
int totalNumberOfColumns = countColumns();
for (int currentVariable = 0; currentVariable < totalNumberOfColumns; currentVariable++) {
if (getPlotColumn(currentVariable)) {
DataTable table = getDataTable();
synchronized (table) {
Iterator iterator = table.iterator();
int i = 0;
double[][] data = new double[getDataTable().getNumberOfRows()][3];
double[][] deviation = new double[getDataTable().getNumberOfRows()][3];
while (iterator.hasNext()) {
DataTableRow row = (DataTableRow) iterator.next();
data[i][0] = row.getValue(getAxis(0));
if (Double.isNaN(data[i][0])) {
data[i][0] = 0.0d;
}
data[i][1] = row.getValue(getAxis(1));
if (Double.isNaN(data[i][1])) {
data[i][1] = 0.0d;
}
data[i][2] = row.getValue(currentVariable);
if (Double.isNaN(data[i][2])) {
data[i][2] = 0.0d;
}
deviation[i][0] = deviation[i][1] = deviation[i][2] = row.getValue(currentVariable);
if (Double.isNaN(deviation[i][0])) {
deviation[i][0] = deviation[i][1] = deviation[i][2] = 0.0d;
}
i++;
}
// PlotPanel construction
Color color = getColorProvider().getPointColor(
(double) (currentVariable + 1) / (double) totalNumberOfColumns);
((Plot3DPanel) getPlotPanel()).addBoxPlot(getDataTable().getColumnName(currentVariable), color,
data, deviation);
}
}
}
} else {
getPlotPanel().removeAllPlots();
}
}
开发者ID:transwarpio,项目名称:rapidminer,代码行数:46,代码来源:BoxPlot3D.java
示例20: createPlotPanel
import org.math.plot.Plot3DPanel; //导入依赖的package包/类
@Override
public PlotPanel createPlotPanel() {
return new Plot3DPanel();
}
开发者ID:transwarpio,项目名称:rapidminer,代码行数:5,代码来源:JMathPlotter3D.java
注:本文中的org.math.plot.Plot3DPanel类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论