[Thread Prev][Thread Next][Index]

Re: [ferret_users] custome color label beyound color 9



Hi -
Thanks to Mick Spillane, who knows PPLUS better than I do.  There are a couple more ways to specify pen color for a label.  The pen number in @P specification is a hexidecimal number, so its value runs 1-9 and A-G.  Or use the @Cnnn syntax which allows for a 3-digit number.  Here's the reference:

http://ferret.pmel.noaa.gov/Ferret/documentation/users-guide/appendix-b-pplus-guide/PPLUS-COMMAND-FILES#_VPID_639

Pen Selection

The pen may also be selected by giving the change pen command @Pn, where n is the character 1-9 and A-G. This allows the selection of up to 16 pens/colors. The color and font is reset to the default font and previous color after the character string is drawn. The PEN command can be used to change the default color by typing PEN,0,default_color.

If you need to select a color index beyond the range of P1 through PG, you can use the change color command @Cnnn where "nnn" is a 3-digit color index. (It must be 3 digits.)
So, we can do this for example:
yes? SET MODE LINECOLORS:10
yes? PPL COLOR,10,100,50,0 ! orange
yes? plot/color=10/i=1:10 i

   ! Make a label specifying pen 10 as letter "a"
yes? label 5 10 -1 0 .2 @PaHere is a label using Pa

   ! Or make the label using 3-digit color number 010
yes? label 5 5 -1 0 .2 @c010Here is a label using C010
We'll find a way to better document this.

Ansley

On 1/17/2012 9:27 AM, Ansley Manke wrote:
Hi -
Thank you for the report.  Yes, that is a bug.  The command parsing step is expecting only one digit for the pen-color number.  We'll get that fixed.

Ansley

On 1/17/2012 6:09 AM, jagadish karmacharya wrote:
Dear ferret users,

I have increse the default number of colors from 6 to 11 and set the colors of pen.

(e.g. 
SET MODE LINECOLORS:11
PPL COLOR,7,100,50,0; PPL COLOR,8,0,55,0 ; PPL COLOR,9,60,0,100; PPL COLOR,10,100,60,70; PPL COLOR,11,80,70,60        
)

these new pen works fine for ploting line but works only up to pen 9 with lable ( see command below). Lable color is black for pen 10 and beyound. 
label 50 -80 -1 0 .2 @P6Here is a label in white

Is this a bug?

OK, on further testing, I found that the @p accepts only first digit as the color code and treat trailing degit as part of label.
I tried defining symbol and defining variable using let command to represting the double digit color code but the problem still
 persist.
Best regards,
 
Jagadish

[Thread Prev][Thread Next][Index]
Contact Us
Dept of Commerce / NOAA / OAR / PMEL / Ferret

Privacy Policy | Disclaimer | Accessibility Statement