Thank you all for your help!

Ric Sherlock responded:

> Does this help?
>   pd 'reset'
>   pd 'itemcolor red'
>   pd 'type marker'
>   pd 'markersize 1.2'
>   pd 'markers circle'
>   pd (i.15);15?30
>   pd 'itemcolor blue'
>   pd (5+ i.10);7 + 10?30
>   pd 'show'
>
> Or are you after more of a continuous colour change?

Yes, but just recognisable differences is the criterion, so not too many
shades. I would like to be able to define my own palette.

Andrew Nikitin responded:

> > How can I
> > increase the information by colouring the dots according to a colour 
> > band indexed by a variable z?
> 
> Plot will not do this for you. You will have to group your data by z 
> variable (possibly using /. adverb) and plot each group with 
> appropriate color.
> Same thing applies if you want to use different marker type or size.

Yes, I can do this rather easily. Knowing I'm not missing an obvious trick,
I shall do it this way.

Ric Sherlock came back with:

> Yes, here is a basic(ish) example:
> 
>   pd 'reset'
>    pd 'type point'
>    pd 'itemcolor red,orange,yellow,green,blue'
>    pd 'pensize 5'
>    dat=: 50?50
>    datgrp=: <.@(%&10) dat           NB. calc groups for dat
>    pd@> ;/@|: &.>  (~.datgrp)/:~(datgrp </. ] ,.~ i.@#) dat
>    pd 'show'

This works fine and does what I want. The only drawback is the colours. I
want to be more subtle.

Can I create my own palette, like was done for the Surface of Revolution,
using CLR=: (RED,:YELLOW) hue 0.1*i.11? Or was this done in a plotting
locale?

Regards

Graham




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

Reply via email to