MCPcopy Create free account
hub / github.com/OpenSourcePhysics/osp / append

Method append

src/org/opensourcephysics/display/Stripchart.java:65–77  ·  view source on GitHub ↗

Appends an (x,y) datum to the Stipchart. @param x @param y

(double x, double y)

Source from the content-addressed store, hash-verified

63 * @param y
64 */
65 @Override
66public void append(double x, double y) {
67 if(!enabled) {
68 super.append(x, y);
69 return;
70 }
71 if((index!=0)&&(x<lastx)) {
72 clear(); // x values are not increasing so clear and restart data collection
73 }
74 lastx = x;
75 super.append(x, y);
76 trim();
77 }
78
79 /**
80 * Appends (x,y) data-arrays to the Stipchart.

Callers

nothing calls this directly

Calls 3

clearMethod · 0.95
trimMethod · 0.95
appendMethod · 0.65

Tested by

no test coverage detected