Questions about draw and gnuplot



Hello,
I am trying to develop some interactive tools for use with draw2d.
  Anyone know the answers to the following questions?

1.  Where does maxima store the data for a plot?  I know how to a file, 
and I can do some mininal things with those coordinates, but I want to 
do more.  I don't know where the whole plot data is stored.

2. Does anyone have examples with the "keypressed" command in the 
gnuplot interface to draw2d?
    I want to click on a point in the graphics window, say with mouse 
button 1, keep the mouse down, drag it to another point and when it  is 
released, see a line segment added to the existing plot.  Then, with a 
keypress, I want to have an action done to the plot. For instance, have 
the line segment mapped with a pre-existing function to a parabola. I 
want to have the existing plot remain with the line segment and the 
parabola added to it.

These are similar to some very basic things available in the drawing 
program xfig.  I would like to use maxima to implement some similar 
things with draw2d.

Any ideas or suggestions would be appreciated.

TIA,
  -sen