Home > Net >  Drawing function image
Drawing function image

Time:10-08

In soft in c # development, a need to implement using existing data fitting function, to coordinate the graph drawn according to the function,
Now plans to use the MATLAB simulation function, the corresponding coordinate graph drawn according to the function in c #, c # a graph how to implement? Are there any libraries, plug-ins can be used for?

CodePudding user response:

Take not the Chart control

CodePudding user response:

reference 1st floor HZTLTGG response:
bring does not have a Chart control

Chart can draw function diagram?

CodePudding user response:

What is the "function", you say? Isn't the custom work out x y, generate a set of data graph?

CodePudding user response:

You can look for third-party libraries,

If you can draw a simple picture, is a Windows form or WPF

CodePudding user response:

Not so simple, want to plot function is fitting to get the
WPF is

CodePudding user response:

references 4 floor XBodhi. Response:
you can look for third-party libraries,

If you can draw a simple picture, is a Windows form or WPF

Not so simple, want to plot function is fitting to get the
WPF is

CodePudding user response:

WPF Canves can draw, just long time no,

CodePudding user response:

 https://www.cnblogs.com/lonelyxmas/p/9603986.html

CodePudding user response:

If it is not complicated, drawing function in c # to go, simple to use,

Below literally spend two axes, similarly, grid, curve, fangyuan can draw,
 
B=New Bitmap (PictureBox1. Width, PictureBox1. Height)
G=Graphics. FromImage (b)
P=New Pen (System. Drawing. Color. Black)

Right to Lear (System. Drawing. Color. White)
P.E ndCap=Drawing2D. LineCap. ArrowAnchor

G.D rawLine (p, New Point (0, 10), New Point (PictureBox1 Width - 10, 10))
G.D rawLine (p, New Point (10, 0), New Point (10, PictureBox1. Height - 10))

PictureBox1. Image=b

CodePudding user response:

OMG, turn the above code is VB.NET, c #

 
Bitmap b=new Bitmap (pictureBox1. Width, pictureBox1. Height);
Graphics g=Graphics. FromImage (b);
Pen p=new Pen (System. Drawing. Color. Black);

Right to Lear (System. Drawing. Color. White);
P.E ndCap=System. Drawing. Drawing2D. LineCap. ArrowAnchor;

G.D rawLine (p, new Point (0, 10), new Point (pictureBox1 Width - 10, 10));
G.D rawLine (p, new Point (10, 0), new Point (10, pictureBox1. Height - 10));

PictureBox1. Image=b;

CodePudding user response:

?????????
Mentioned you know somebody else's matlab plot drawing is a collection of x, begging a set y

So, we here, too, don't tangle, fitting out of function, the variable is brought inside
With x, y set how you want to paint it how
  •  Tags:  
  • C#
  • Related