FWIW I did this yesterday with python-gnuplot.
$ python go.py /dev/tty/USB01
#!/usr/bin/env python2.5
import Gnuplot
import serial
import sys
ser = serial.Serial(sys.argv[1], 9600)
readings = []
g = Gnuplot.Gnuplot()
g.title("Thermistor readings")
g('set data style lines')
g('set yrange [-5:105]')
while 1:
reading = ser.readline().split()
print reading
readings.append(reading)
if len(readings) > 100:
readings = readings[-10:]
g.plot(readings)
In arduino:
#define REPORTING_INTERVAL 1
float time;
int reading;
void read_pin(char pin)
{
while (1) {
time = 0.001 * millis();
reading = analogRead(pin);
Serial.print(time);
Serial.print(' ');
Serial.println(reading);
delay(1000*REPORTING_INTERVAL);
}
}
void setup()
{
Serial.begin(9600);
delay(100);
}
void loop()
{
read_pin(4);
}