Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

To make the axis title visible on Plotly.NET for C#, you need to set the title property of the axis object. Here's an example:

using Plotly; // create a scatter plot var scatterPlot = Chart.Scatter(  new XY[]  {  new XY(1, 2),  new XY(2, 3),  new XY(3, 4),  } ); // set the x-axis title scatterPlot.WithXTitle("X-axis"); // set the y-axis title scatterPlot.WithYTitle("Y-axis"); // render the plot var div = scatterPlot.GetHtml(); 

In this example, we create a scatter plot using the Chart.Scatter method. Then, we set the x-axis title using the WithXTitle method, and the y-axis title using the WithYTitle method. Finally, we render the plot using the GetHtml method.