-
August 30th, 2006, 04:19 PM
#1
[RESOLVED] How to Create a Graph?
I found this example of plotting points and making a graph using the Graphic class. It uses DrawLines, DrawEllicpse, and DrawString to create the axis and lines.
My question is how do I create my own axis to fit whatever scale I chose to use? There is a ScaleTransform, but that scale the entire grapic/paint field. I would like to know how I would go about creating an axis that could range from 0-10 on one axis and 0-1 on the second.
Any help will be useful.
-= the best is yet to come =-
-
August 31st, 2006, 02:15 AM
#2
Re: How to Create a Graph?
I have used a library called ZedGraph for this. It is free to use and has lot of examples.
-
August 31st, 2006, 04:13 PM
#3
Re: How to Create a Graph?
I am also using ZedGraph now a days and found it really good.
- Poonam.
-
August 31st, 2006, 04:47 PM
#4
Re: How to Create a Graph?
Don't forget to add these to your Form1.Designer.cs
Code:
this.Load +=new System.EventHandler(Form1_Load);
this.Resize += new System.EventHandler(Form1_Resize);
zg1 is supposed to be your control . You have to add the control to your toolbox
Open the form design so that it appears in the current window. View the toolbox using the View/Toolbox menu command. Right-click inside the "General" or "Components" sub-pane of the tool box, and select the "Choose Items..." option. Click "Browse...", and navigate to the zedgraph.dll file. Once this file is added, you should see a ZedGraphControl option in the toolbox.
After that , that a ZedGraphControl to your form and modify the name to zg1.
Don't forget to add a reference to ZedGraph.dll and the using ZedGraph statement from the beginning.
Last edited by creatorul; August 31st, 2006 at 04:49 PM.
Reason: Someone deleted your last post , capitolc
-
August 31st, 2006, 04:59 PM
#5
Re: [RESOLVED] How to Create a Graph?
Thanks for all of the help. Much appreciated!
-= the best is yet to come =-
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|