I am producing 2D dot scatter plots of (x,y) data in monochrome. How can I
increase the information by colouring the dots according to a colour band
indexed by a variable z?

A clue is given in the definition of the Surface of Revolution in the 3D
examples, i.e.

X=. steps _2 1.9 50
dat=. cutxyz 40 surfacerev (2+*:X);X
CLR=: (RED,:YELLOW) hue _8}.8}.int01 32

pd 'backcolor teal;color CLR'
pd 'edgecolor 64 64 64'
pd 'type surface'
pd dat

Developing the ideas shown above, I have tried:

   RED=: 255 0 0
   YELLOW=: 255 255 0
   [CLR=: (RED,:YELLOW) hue 0.1*i.11
255     0 0
255  25.5 0
255    51 0
255  76.5 0
255   102 0
255 127.5 0
255   153 0
255 178.5 0
255   204 0
255 229.5 0
255   255 0
   pd 'type dot'
   pd 'pensize 5'
   pd 'color CLR'
   pd i.11
   pd 'show'

This gives me a line of blue dots. If I try itemcolor instead of color I get
the same plot followed by this error message:

|length error: gppshape
|   e=.(#p)    $e

Can anybody help me, please?

Graham



----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

Reply via email to