C# Zedgraph
-
böyle bi dll ekledim fakat grafiğin cizgisini kaldıramıyorum sadece noktalara ihtiyacım var kodlar aşağıda
ZedGraphControl myGraphic = new ZedGraphControl();
myGraphic.Size = new Size(panel1.Width - 2, panel1.Height - 2);
GraphPane myGraphPane = myGraphic.GraphPane;
myGraphPane.Title.Text = "Automobile";
myGraphPane.XAxis.Title.Text = "X ekseni";
myGraphPane.YAxis.Title.Text = "Y ekseni";
// myGraphPane.AddCurve("label", xxx, yyy, Color.Red, SymbolType.Square);
CurveItem cri;
cri = myGraphPane.AddCurve("", xxx, yyy, Color.Red, SymbolType.Triangle);
cri.L = false;
myGraphic.AxisChange();
panel1.Controls.Add(myGraphic);
-
edit:BolderStyle diye bir özellği var mı?
-
Ercab bunu yazdı:
-----------------------------
edit:BolderStyle diye bir özellği var mı?
-----------------------------bulamadım
-
sharpshooter a sormak lasim :) tam olarak ne iş yapıyor zedgraph ?
-
grafik çizer
-
merhaba hocam;
dediğin kütüphaneyi hiç kullanmadım.ben kendi çizimlerimi kendim direk olarak gdi+ ile çizdiriyorum.
ne yazıkki şuan bağlandığım bilgisayar ile dediğin kodları çalıştıramıcam. ancak cumartesi günü falan yardımcı olabilirim ?
-
SharpShooter bunu yazdı:
-----------------------------
merhaba hocam;
dediğin kütüphaneyi hiç kullanmadım.ben kendi çizimlerimi kendim direk olarak gdi+ ile çizdiriyorum.
ne yazıkki şuan bağlandığım bilgisayar ile dediğin kodları çalıştıramıcam. ancak cumartesi günü falan yardımcı olabilirim ?
-----------------------------çok gec hocam benim için neyse başka türlü çizmeye çalışayım bende
-
su yukardaki kodu kulanarak herangibi bir funksionun grafigini nasil cizdirtirebilirim orneyni sin(x) ?
-
(Ç)alıntıdır orjinali için
çalışması için sayfadaki dll ihtiyaç vardır
private void Form1_Resize( object sender, EventArgs e ) { SetSize(); } // SetSize() is separate from Resize() so we can // call it independently from the Form1_Load() method // This leaves a 10 px margin around the outside of the control // Customize this to fit your needs private void SetSize() { zedGraphControl1.Location = new Point( 10, 10 ); // Leave a small margin around the outside of the control zedGraphControl1.Size = new Size( ClientRectangle.Width - 20, ClientRectangle.Height - 20 ); } // Respond to form 'Load' event private void Form1_Load( object sender, EventArgs e ) { // Setup the graph CreateGraph( zedGraphControl1 ); // Size the control to fill the form with a margin SetSize(); } // Build the Chart private void CreateGraph( ZedGraphControl zgc ) { // get a reference to the GraphPane GraphPane myPane = zgc.GraphPane; // Set the Titles myPane.Title.Text = "My Test Graph\n(For CodeProject Sample)"; myPane.XAxis.Title.Text = "My X Axis"; myPane.YAxis.Title.Text = "My Y Axis"; // Make up some data arrays based on the Sine function double x, y1, y2; PointPairList list1 = new PointPairList(); PointPairList list2 = new PointPairList(); for ( int i = 0; i < 36; i++ ) { x = (double)i + 5; y1 = 1.5 + Math.Sin( (double)i * 0.2 ); y2 = 3.0 * ( 1.5 + Math.Sin( (double)i * 0.2 ) ); list1.Add( x, y1 ); list2.Add( x, y2 ); } // Generate a red curve with diamond // symbols, and "Porsche" in the legend LineItem myCurve = myPane.AddCurve( "Porsche", list1, Color.Red, SymbolType.Diamond ); // Generate a blue curve with circle // symbols, and "Piper" in the legend LineItem myCurve2 = myPane.AddCurve( "Piper", list2, Color.Blue, SymbolType.Circle ); // Tell ZedGraph to refigure the // axes since the data have changed zgc.AxisChange();
