ij.gui.Plot enhancement request...
Posted by Jeffrey B. Woodward on Nov 13, 2008; 6:32am
URL: http://imagej.273.s1.nabble.com/ij-gui-Plot-enhancement-request-tp3694518.html
ImageJ'ers/Wayne,
I am trying to use the ij.gui.Plot class to create a scatter plot.
Actually, the Plot contains both a scatter plot and a simple curve
(diagonal line with points at [0,0] and [max,max]). The diagonal line is
just for a visual reference; the real data points are what make up the
scatter plot. The issue is that in doing this, I can't find a way for
the user to use the List button (or the Save button) to get a listing of
the data points. This is because the List/Save buttons seem only appear
to operate on the points used in the constructor (in my case the
endpoints of the reference diagonal), but my data points for the scatter
plot are added after construction using the addPoints() method.
My first thought was to supply my scatter plot points in the constructor
and add the reference line with the addPoints() method; however, I don't
see any way to avoid drawing them as a polyline doing it this way -- I
want a scatter plot of those points, not a polyline!
Hopefully I am missing something obvious in the API/source code, but in
case if I am not, is this an enhancement that the ImageJ community is
interested in? Should I take a crack at this myself, or is somebody else
interested enough to do it?
BTW: I suppose that there may be a hack/workaround for my specific
case...perhaps I could supply my points in the constructor drawn with a
fully transparent color/invisible-ink, then add the points for my
reference diagonal using the addPoints() method with a LINE shape and
appropriate color, and lastly, add the scatter plot points [again] with
the addPoints() method with a DOT shape and appropriate color. Seems
ugly -- probably doomed to failure -- other
suggestions/hacks/workarounds/free-therapy-sessions are welcome.
Many thanks,
-Woody