Strange Shapes over the plotmodel

Oystein Bjorke il y a 6 ans 0
This discussion was imported from CodePlex

hectorcres wrote at 2012-05-28 10:53:

Hi objo !


First of all, i want to say you that im so very grateful for your work... you are helpping us a lot and all thanks is little.

Well my problem is that when im plotting a lineseries i obtain this strange shapes that interrupts the nice view of the plot.. like this

When i tried to resize the plot the shapes change their appereance and I can get it disappears but it returns when i resize..

I tried to refresh the plot and the invalidate method in the plot's construct but is the same..

I would appreciate any responses.. cheers


objo wrote at 2012-05-28 12:44:

I have seen similar output when using dotted/dashed grid lines. Are you using a line style different from solid? Then a workaround is to change to solid (this is also much faster to render). I think this is a bug in WPF's dashed/dotted line rendering, we don't see similar behaviour in winforms.

You could also send the plot generating code (ctrl+alt+c) to help us reproduce the problem. Or export the plot to xaml and find the object that is causing the error!

bsguedes wrote at 2012-05-28 22:01:

I have found the same problems. It seems that this issue happens when using dotted style for grid lines (dashed and solid work fine for me)

hectorcres wrote at 2012-05-29 09:32:

Thanks a lot for your response it has resolve all my problems. i've deleted MinorGridlineStyle for both axis and this give me more capacity for analyze correctly all the data in the plot. The strange shapes have dissapear with your help. Thanks other time. Here is my old code with the MinorGridLine option.



public static PlotModel Untitled() {           

var plotModel1 = new PlotModel();     

plotModel1.PlotAreaBackground = OxyColors.Gray;       

var linearAxis1 = new LinearAxis();           

linearAxis1.MajorGridlineStyle = LineStyle.Solid;           

linearAxis1.MaximumPadding = 0;           

linearAxis1.MinimumPadding = 0;           

linearAxis1.MinorGridlineStyle = LineStyle.Dot;           

linearAxis1.Position = AxisPosition.Bottom;           

linearAxis1.Title = "TimeStep (20 sec)";           


var linearAxis2 = new LinearAxis();           

linearAxis2.MajorGridlineStyle = LineStyle.Solid;           

linearAxis2.MaximumPadding = 0;           

linearAxis2.MinimumPadding = 0;           

linearAxis2.MinorGridlineStyle = LineStyle.Dot;           


return plotModel1;       


doingnz wrote at 2012-09-05 19:17:

Thank you for the very prompt help! It is now fixed.

In my application the rendering problem is only experienced if MinorGridLineStyle. is set to


I quickly tried the other line styles and they appear to work fine!

This should be reported to WPF group at Microsoft.