Hello
I need to draw two graphs in comparison and at a certain value of the abscissa calculate the difference and draw the difference segment, perhaps with a different color depending on the value of the difference.
Mathematically it is obvious that it is enough to "calculate" the intersection and draw the line between the two points, but does some mechanism already exist in the library?
Can you give me an idea ?? Should you draw a further series or a line ??
Ciao
Difference beetwen graphs (WPF)
Moderator: Arction_LasseP

 Posts: 383
 Joined: Mon Mar 14, 2016 9:22 am
Re: Difference beetwen graphs (WPF)
Hello,
Not sure that I grasped your needs exactly but look at Custom shaping and coloring with CustomLinePointColoringAndShaping event
However, the speed of rendering will be slow if you have a lot of point or updating frequently. In that case, adding another series (small excerpt from original) will be more optimal.
Not sure that I grasped your needs exactly but look at Custom shaping and coloring with CustomLinePointColoringAndShaping event
However, the speed of rendering will be slow if you have a lot of point or updating frequently. In that case, adding another series (small excerpt from original) will be more optimal.
Re: Difference beetwen graphs (WPF)
No, the question is simple, I have not explained well!
I want to have the two functions y = f (x) and y '= f' (x) and I would like to draw the difference segment at the point x = x0 as in the picture
I want to have the two functions y = f (x) and y '= f' (x) and I would like to draw the difference segment at the point x = x0 as in the picture
 Attachments

 DiffGraphs.jpg (298.93 KiB) Viewed 4218 times

 Posts: 383
 Joined: Mon Mar 14, 2016 9:22 am
Re: Difference beetwen graphs (WPF)
If you wish to draw 'red line', then you can simply use LineCollections (is a collection of line segments; check corresponding example or Manual for illustration).
If you want something more fancy, then you can use Annotation objects  check "Annotations" example (Demo App >ViewXY > Others) for variety of shapes and reference systems.
Hope this helps.
If you want something more fancy, then you can use Annotation objects  check "Annotations" example (Demo App >ViewXY > Others) for variety of shapes and reference systems.
Hope this helps.
Re: Difference beetwen graphs (WPF)
PERFECT!
Grazie
Grazie
 Attachments

 DiffGraph_002.png (60.01 KiB) Viewed 4212 times