I start using Plotly.NET for plotting. Everything was OK until I start plot 3D surfaces and my axis title disappear.
There is part of the code
my_func(double[] x, string[] y, double[,] z)
//...
LinearAxis xAxis = LinearAxis();
xAxis.SetValue("title", "axis title");
Layout layout = new Layout();
layout.SetValue("xaxis", xAxis);
Trace surface = new Trace("surface");
surface.SetValue("x", x);
surface.SetValue("y", y);
surface.SetValue("z", z);
GenericChart.ofTraceObject(true, surface).WithLayout(layout: layout).Show();
And axis still the default.
I want to change AxisTitle and to know what the problem is
Please help
I try to use Plotly.NET.CSharp instead Plotly.NET
I also try this construction:
Chart.Surface<double, double, double,string>(
zData: new double[][] {new double[]{1,1}, new double[]{1,1}},
X: new double[] { 1, 2 },
Y: new double[] { 5, 10 })
.WithXAxisStyle<double, double, string>(Title: Plotly.NET.Title.init("xAxis"))
.WithYAxisStyle<double, double, string>(Title: Plotly.NET.Title.init("yAxis"))
.Show();
It doesn't help, but other functions such as WithSize, WithTraceInfo
and etc. work fine
Chart.Surface<double, double, double,string>(zData: new double[][] {new double[]{1,1}, new double[]{1,1}},
X: new double[] { 1, 2 },
Y: new double[] { 5, 10 }, ShowScale: false)
.WithSize(1500,1500).WithTraceInfo(Name: "Name", ShowLegend: true, LegendGroupTitle: Plotly.NET.Title.init("TITLE") )
.Show();