zedgraph

How can I set different colors in a ZedGraph histogram?

こ雲淡風輕ζ 提交于 2019-12-08 18:03:36
I got a histogram drawn in ZedGraph. And I have to set the specific color for a specific range of the values. For example: Graph Pane = zedGraph.GraphPane; list = new PointPairList (); for (int i = 0; i < 256; i++) { list.Add(i, array_with_y_values[i]); } Pane.AddBar("", list, Color.Red); And how I can set the other color for some of them? Are you looking for something like this? This piece of code adds 50 bars with random y values between 0 and 15. It will color bars with y values <5 as red, 5-10 as yellow, and >10 as green. GraphPane pane = zedGraphControl1.GraphPane; PointPairList list =

ZedGraph License [closed]

孤街醉人 提交于 2019-12-08 09:48:28
问题 Closed. This question is off-topic. It is not currently accepting answers. Want to improve this question? Update the question so it's on-topic for Stack Overflow. Closed 4 years ago . I made a C# Winform application, my application briefly dealing with displaying sensors values during operating time, in addition to some other Input/Output tasks. Let's skip the algorithm part, (nothing special to mention here). For the display part, I decided to work with ZedGraph library for its awesome

C#: ZedGraph Show All Points of Zoomed Area

生来就可爱ヽ(ⅴ<●) 提交于 2019-12-08 05:01:12
问题 I am plotting to my data to ZedGraph. Using FileStream to read files. Sometimes my data is greater than 200 megabyte. To draw this amount of data i should calculate peak values or must apply a window. However i want to see the all points of zoomed area. Please share any suggestion. PointPairList list1 = new PointPairList(); int read; int count = 0; while (file.Position < file.Length) { read = file.Read(mainBuffer, 0, mainBuffer.Length); for (int i = 0; i < read / window; i++) { list1.Add

How can I set different colors in a ZedGraph histogram?

徘徊边缘 提交于 2019-12-08 04:05:51
问题 I got a histogram drawn in ZedGraph. And I have to set the specific color for a specific range of the values. For example: Graph Pane = zedGraph.GraphPane; list = new PointPairList (); for (int i = 0; i < 256; i++) { list.Add(i, array_with_y_values[i]); } Pane.AddBar("", list, Color.Red); And how I can set the other color for some of them? 回答1: Are you looking for something like this? This piece of code adds 50 bars with random y values between 0 and 15. It will color bars with y values <5 as

Labelling and circle a specific point in zedgraph

心已入冬 提交于 2019-12-07 13:30:20
问题 I am currently doing a project in which I've managed to identify the peak I want. However, I wanted to do more like circling the particular point with a label attached to it. Is it possible to do that in Zedgraph? I've attached a snippet of my code which only include a text label to that point, and I wanted to do more so people will identify the point more easily. PointPair pt = myCurve.Points[i-1]; const double offset = 0.8; TextObj text = new TextObj("P", pt.X, pt.Y + offset, CoordType

Draw date on X axis and time on Y axis using ZedGraph and C#

寵の児 提交于 2019-12-07 05:21:06
问题 In ZedGraph, how do I draw a time (like 00:00, 02:00, 04:00, etc.) on the Y axis and date (like 12-Apr-11, 13-Apr-11, 14-Apr-11, etc.) on the X axis? The bar settings has been set to BarType.Stack . Sample code will be very helpful. 回答1: Here is a sample that I constructed. I was not sure what sort of data you would plot along the Y Axis using a time format except for something like an accrued amount of time (such as number of hours employees worked). ZedGraph uses an XDate format for time

Why is my C# program faster in a profiler?

被刻印的时光 ゝ 提交于 2019-12-06 19:34:37
问题 I have a relatively large system (~25000 lines so far) for monitoring radio-related devices. It shows graphs and such using latest version of ZedGraph. The program is coded using C# on VS2010 with Win7. The problem is: when I run the program from within VS, it runs slow when I run the program from the built EXE, it runs slow when I run the program though Performance Wizard / CPU Profiler, it runs Blazing Fast. when I run the program from the built EXE, and then start VS and Attach a profiler

Labelling and circle a specific point in zedgraph

梦想与她 提交于 2019-12-05 18:48:38
I am currently doing a project in which I've managed to identify the peak I want. However, I wanted to do more like circling the particular point with a label attached to it. Is it possible to do that in Zedgraph? I've attached a snippet of my code which only include a text label to that point, and I wanted to do more so people will identify the point more easily. PointPair pt = myCurve.Points[i-1]; const double offset = 0.8; TextObj text = new TextObj("P", pt.X, pt.Y + offset, CoordType.AxisXYScale, AlignH.Left, AlignV.Center); text.ZOrder = ZOrder.A_InFront; text.FontSpec.Border.IsVisible =

Generating and Saving ZedGraph plots without showing on forms

情到浓时终转凉″ 提交于 2019-12-05 17:42:53
问题 Is it possible to plot data on to a ZedGraph graph and save it as a file without showing / generating a graph that is visible to the user? I'm looking to process a lot of datasets and generate a graph and saving it to a file for viewing outside of the application. If this can't be done, would it be possible show the graph on a hidden/minimized form, save the graph, close the window, and repeat for each graph? 回答1: It is possible. You create and manipulate the ZedGraph control as usual, but

Draw date on X axis and time on Y axis using ZedGraph and C#

南笙酒味 提交于 2019-12-05 10:21:49
In ZedGraph, how do I draw a time (like 00:00, 02:00, 04:00, etc.) on the Y axis and date (like 12-Apr-11, 13-Apr-11, 14-Apr-11, etc.) on the X axis? The bar settings has been set to BarType.Stack . Sample code will be very helpful. Here is a sample that I constructed. I was not sure what sort of data you would plot along the Y Axis using a time format except for something like an accrued amount of time (such as number of hours employees worked). ZedGraph uses an XDate format for time along the axes, which are doubles converted from datetimes. However in a stacked bar, I am not sure if