Last try for iTools colorbar [message #60214] |
Sat, 03 May 2008 09:25 |
Kenneth P. Bowman
Messages: 585 Registered: May 2000
|
Senior Member |
|
|
So I thought to try one last thing before giving up on adding a colorbar
to my iTool plot: create the colorbar as an image in direct graphics,
then load the image into the annotation layer of my iTool.
The code below definitely adds an image object to the iTool annotation
layer, but nothing is visible except object handles around a tiny object,
despite a couple of hours of trial-and-error tinkering with keywords for
IDLitVisImage. This ought to be a simple thing, but, as usual, I'm stumped.
Without a colorbar I can make art with iTools, but not scientific
graphics.
Anyone know how to put an image into the annotation layer?
Ken Bowman
PRO IMAGE_TEST2
ISURFACE, DIST(100), DIMENSIONS = [640, 480]
image = READ_PNG('test.png')
HELP, image
itool_id = itGetCurrent(TOOL = itool_obj)
annotation_layer_id = itool_obj -> FindIdentifiers('*/ANNOTATION LAYER')
annotation_layer_obj = itool_obj -> getByIdentifier(annotation_layer_id)
annotation_layer_obj -> add, OBJ_NEW('IDLitVisImage', DATA = image)
END
|
|
|