Greetings, I'm currently dealing with koolplot and here is my problem. I need to generate a graph which consist of 2 data, X-axis would be fixed, whereby it will range from -1 to 101. As for Y-axis, it will have the data stored inside the arrays. Now I need to plot one line showing the data of array and another line showing data of array1. The following is my current code but it can't generate a graph. It does not have any compilation error and I'm using Quincy 2005
[PHP]#include <koolplot.h>
using namespace std;
int main()
{
double array[100];
double array1[100];;
for(int i=0; i<100.0; i++)
{
array[i] = i+1;
array1[i] = i+1;
}
plotdata x(-1, 101),
y(array, 100);
plotdata z(array1, 100);
setColor(x, y, CRIMSON);
x << plotdata(-1, 101);
y << z;
plot(x,y);
return 0;
}[/PHP]
Could someone guide me on where's my mistake? And if I want to increase more data (eg. array2, array3 and so on...) into the same graph, what should I add in my code? Thank you