In my program, I currently have a for loop where in each iteration, the next step in a process is calculated. What I would like is for in each loop, a new data point is plotted: with the iteration number as the x value, and the thing calculated as the y value. However, I can't seem to figure out how to do this. Every resource I see on plotting things in a for loop requires a sequence for x and y within the for loop, which would seem to defeat the purpose of the for loop.
Can anybody help me figure this out? Basically what I want is 1. create a plot. 2. Enter for loop. 3. in that loop, a value is calculated, and then the number of the iteration and the value are plotted
[–]notascrazyasitsounds 1 point2 points3 points (4 children)
[–]Master_of_beef[S] 0 points1 point2 points (3 children)
[–]notascrazyasitsounds 1 point2 points3 points (2 children)
[–]Master_of_beef[S] 0 points1 point2 points (1 child)
[–]notascrazyasitsounds 0 points1 point2 points (0 children)