We are about to switch to a new forum software. Until then we have removed the registration on this forum.
Hello! Im new to processing, trying to learn on my own.. Im doing some exercises, but this one got me stuck. I have a .csv file with 12 values in it, and im supposed to make a histogram (bar graph) from these values. Can anyone please tell me how to do that?
The values are both + and - so that means the graph cannot start at a 0 value.. it also has to show the negative values.
This is the code i got so far (might be all wrong!)
int[] data;
void setup(){
size(500,500);
background(255);
fill(255,0,0,30);
String[] grader=loadStrings("grader.csv");
data= int(split(grader[0],","));
//println(grader[0]);
}
void draw(){
for (int x=0; x < data.length; x++){
rect(5,100,20,height-data[0]);
}
}
Comments
Thanks, but i need to load the values to be used in the graph from the file grader.csv.. thats where the problem comes inn.. cos when i do that it only displays one graph..
Perhaps take a look at here too?: 3:-O
http://forum.processing.org/two/discussion/404/cant-read-y-axis-of-loadstring#Item_6
Oh, sorry. It's tough to spot issues in code you can't run.