Mitesh Posted July 3, 2008 Report Share Posted July 3, 2008 Hi, I am using ChartFx 7 Winform (V.7.0.2893.24916) with Visual Studio 2008 (WinFx 3.5). I have successfully plotted Contour chart on ChartFx. I am also using Matlab Software for contour chart. I have plotted same data on ChartFx contour chart and Matlab chart. But Both result are quite different. Hope this is the correct way to plot Contour chart. I have attached image taken from ChartFx and Matlab So please have a look on it. It will gives you clear Idea. My code for chartFx Contour is: ChartFX.WinForms.Chart chart = new ChartFX.WinForms.Chart(); chart.Gallery = Gallery.Contour; Surface myContour = (Surface)chart.GalleryAttributes; myContour.ShowContourLines= true; System.Drawing.Color[] colors = new System.Drawing.Color[] { System.Drawing.Color.White,System.Drawing.Color.White,System.Drawing.Color.White }; myContour.Colors = colors; chart.Data.Series = 256; chart.Data.Points = 256; int count = 0; for (int series = 0; series < chart.Data.Series; series++) for (int point = 0; point < 256; point++) { chart.Data[series, point] = contourPoints[count].HT*1000; count++; } My data for Contour chart is in text file but the sample data is given below. y(f1) x(f2) ht 0 0 0.00020 0 1 0.00021 0 2 0.00022 0 3 0.00023 0 4 0.00024 ....... 1 0 0.00020 1 1 0.00021 1 2 0.00022 1 3 0.00023 1 4 0.00024 and so on...... I am worried why both graphs are different with same data. Using above code and data, ChartFx give me dashed line contour chart while I am getting perfact result from matlab. what's different between both of them? please reply soon. Mitesh Quote Link to comment Share on other sites More sharing options...
Frank Posted July 3, 2008 Report Share Posted July 3, 2008 I don't see a difference. Both charts look the same to me. A contour chart is made up contour lines. I'm not familiar with Matlab's contour charts but in Chart FX these lines are evenly spaced in the Y axis (the Y-Axis is going into the screen). In this case, Chart FX seems to be plotting more contour lines than Matlab, but that's the only difference I see. You can change the number of contour lines by setting: chart.AxisY.Step = <interval>; In any case, I don't see them as two different charts but rather as different views of the same chart. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.