Working on some basic code to plot a 2d array (as x and y axes) as values along z-axis. When I display the plot, it works completely fine:
Shape surface = new SurfaceBuilder().orthonormal( grid, mapper );
Chart chart3d = new AWTChartFactory().newChart( Quality.Advanced() );
chart3d.add( surface );
chart3d.view3d();
chart3d.open();
chart3d.addMouse();
However, when I modify this to be an offscreen plot:
Shape surface = new SurfaceBuilder().orthonormal( grid, mapper );
Chart chart3d = AWTChartComponentFactory.chart( Quality.Nicest(), "offscreen" );
// chart3d.add( surface );
// chart3d.view3d();
// chart3d.open();
// chart3d.addMouse();
I get this stack trace:
Exception in thread "main" java.lang.NoSuchMethodError: 'void org.jzy3d.chart.AWTChart.<init>(org.jzy3d.chart.factories.IChartComponentFactory, org.jzy3d.plot3d.rendering.canvas.Quality, java.lang.String)'
at org.jzy3d.chart.factories.AWTChartComponentFactory.newChart(AWTChartComponentFactory.java:88)
at org.jzy3d.chart.factories.ChartComponentFactory.newChart(ChartComponentFactory.java:71)
at org.jzy3d.chart.factories.AWTChartComponentFactory.chart(AWTChartComponentFactory.java:78)
at com.ioi.utilities.Jzy3dTest.buildSurface(Jzy3dTest.java:71)
at com.ioi.utilities.Jzy3dTest.<init>(Jzy3dTest.java:56)
at com.ioi.utilities.Jzy3dTest.main(Jzy3dTest.java:44)
I can see in the docs that a static method AWTChartComponentFactory#chart(Quality,String) exists. Pretty sure I copied this example from somewhere. Not seeing the issue.
These are the dependencies and repositories I'm using. Some of these may be redundant or unnecessary. I starting pulling everything into my POM thinking I was missing a dependency.
Developing on M1 max MacOS v12.3.1 for deployment on Windows 10 x86.
POM:
Many thanks