From: <mj...@ga...> - 2004-11-13 06:54:16
|
Alan W. Irwin writes: > On 2004-11-12 08:50+0100 Lehmann, Eckhard {TR-I~Penzberg} wrote: > > > > >> This is documented in > >> > > http://plplot.sourceforge.net/docbook-manual/plplot-html-5.3.1/color.htm > > l . > > > > I've read this documentation already and tried to set up the colors > > according to this: > > > > tclsh> package require Plplotter > > tclsh> plframe .f > > tclsh> .f cmd plscol0 0 255 255 255 ;# set color at index 0 to white > > Couldn't parse color 255 > > I am not expert in tcl, but none of examples/tcl/x??.tcl have commands with > the trailing semicolon followed by commentary that you put in the above > command, and my guess is that (the semicolon) is causing the parse error. > >From your later message it appears you have independently arrived at a > similar conclusion. The ';#' syntax is customary in Tcl to safely allow comments at the end of a line of code. Otherwise sometimes the comment gets tangled up in the parsing of the command line. The ';' terminates the previous command to ensure this doesn't ever happen. As for the widget command syntax, it's: <widget> scol0 <i> <color> where <color> is any form suitable to XParseColor(). E.g. from plframe.c -- if ( ! XParseColor(plFramePtr->display, Tk_Colormap(plFramePtr->tkwin), col, &xcol)) { Tcl_AppendResult(interp, "Couldn't parse color ", col, (char *) NULL); return TCL_ERROR; } -- Maurice LeBrun mj...@ga... |