Replies: 2 comments 2 replies
-
You need to add a legend, e.g.
You can find examples in the example browser; code therefore here: https://github.com/oxyplot/oxyplot/blob/develop/Source/Examples/ExampleLibrary/Examples/LegendExamples.cs |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hello,
I have write a little program to begin to test Oxyplot. I have a windows form with a plot view and the standard "cos" function. Everything is ok except the fact that there is no "cos(x)" legend! Here is my code:
`
private void button1_Click(object sender, EventArgs e)
{
Equatorial equ_2000 = Astronomy.Equator(corps, time, observateur, EquatorEpoch.J2000, Aberration.Corrected);
Equatorial equ_ofdate = Astronomy.Equator(corps, time, observateur, EquatorEpoch.OfDate, Aberration.Corrected);
Topocentric hor = Astronomy.Horizon(time, observateur, equ_ofdate.ra, equ_ofdate.dec, Refraction.Normal);
labelHauteur.Text = hor.altitude.ToString("0.##");
labelAzimuth.Text = hor.azimuth.ToString("0.##");
var myModel = new PlotModel { Title = "Example 1" };
myModel.Series.Add(new FunctionSeries(Math.Cos, 0, 10, 0.1, "cos(x)"));
plotView.Model = myModel;
}
`
Thanks for your help
Michel
Beta Was this translation helpful? Give feedback.
All reactions