Код: Выделить всё
import org.math.plot.*
import javax.swing.JFrame
class ScatterPlot3DExample {
static void main(String[] args) {
Plot3DPanel plot = new Plot3DPanel()
double[] x = [1, 2, 3, 4, 5] as double[]
double[] y = [5, 4, 3, 2, 1] as double[]
double[] z = [10, 20, 30, 40, 50] as double[]
plot.addScatterPlot("3D Scatter Plot", x, y, z)
plot.setAxisLabel(0, "X Axis")
plot.setAxisLabel(1, "Y Axis")
plot.setAxisLabel(2, "Z Axis")
JFrame frame = new JFrame("3D Scatter Plot Example")
frame.setContentPane(plot)
frame.setSize(600, 600)
frame.setVisible(true)
frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE)
}
}
Код: Выделить всё
00:00:00,691 ERROR: Cannot evaluate Opaque Action: org.codehaus.groovy.control.MultipleCompilationErrorsException: startup failed: Script13.groovy: 6: unable to resolve class Plot3DPanel @ line 6, column 21. Plot3DPanel plot = new Plot3DPanel() ^ Script13.groovy: 6: unable to resolve class Plot3DPanel @ line 6, column 28. Plot3DPanel plot = new Plot3DPanel() ^ 2 errors
Раньше я пробовал использовать JavaScript, но кажется, что встроенные функции nashorn и rhino не работают с проектами в гитхаб. В любом случае, я просто пытаюсь отобразить результаты других поведенческих операций на графике активности sysml в трехмерной диаграмме рассеяния, максимально не используя Matlab. Буду признателен за любую помощь, которую вы можете оказать.
Подробнее здесь: https://stackoverflow.com/questions/788 ... ar-or-othe