Home c# How to build a graph on the array?

How to build a graph on the array?





There is a one-dimensional array.
I sorted it, the average arofmetical calculated, recognized the minimum and maximum value, they received them.

Next, the following is written on the task:
According to the resulting array of numbers, it is necessary to construct a graph of the relationship between the element number and the value of the resulting array. Graphs must be accompanied by relevant comments.

Help, please understand the task, that is, to figure out how to build a schedule.

Answer 1, Authority 100%

When they say to build a graph of the relationship between the “first” and “second”, then they take the coordinate axis and x are the values ​​of the “first”, and by y the second “(or vice versa, if more convenient).

That is, you will have the x axis to have the values ​​of the element number, and for y the values ​​of the element. Well, on the example of an array sorted by increasing:

array = & gt;
 [0] = 5,
 [1] = 6,
 [2] = 8.0,
 [3] = 11.0,
 [4] = 18.0,
 [5] = 19.0
 [6] = 20.0
 [7] = 20.0

It turns out such a constantly increasing schedule:

p.s. Although it would not hurt to learn from the one who gave such a task where he wants to see the built graphs and what comments is required by him. It is very similar to the learning task that is done only in order to have something to take students.

Programmers, Start Your Engines!

Why spend time searching for the correct question and then entering your answer when you can find it in a second? That's what CompuTicket is all about! Here you'll find thousands of questions and answers from hundreds of computer languages.

Recent questions