Mia culpa! Please update plot package using pacman again. Птн, 20 Апр 2012, Linda Alvord писал(а): > > Earlier today many of the suggestions in this thread worked quite well. > However, now all of them now do not work and I get this message. What have > I changed that would cause that error? > > |domain error: script | CONSOLEOUTPUT=:(( > > Linda > > -----Original Message----- > From: programming-boun...@jsoftware.com > [mailto:programming-boun...@jsoftware.com] On Behalf Of Graham Parkhouse > Sent: Friday, April 20, 2012 6:20 PM > To: programming@jsoftware.com > Subject: Re: [Jprogramming] Colouring dots in plot > > Ric, thank you for this. Defining a palette in the _z_ locale is just the > ticket. I shall explore colorxy_jzplot_. There are no obstacles in my way > now to some very useful data visualisation. > > J602 has worked a treat, allowing me to develop software which analyses and > reports on 80 MB sets of data. My client wanted me to do it in Python but > content themselves that they can rewrite it in Python if they need to since > I have described the analysis procedure in some detail. > > The success of the project is giving me a buzz. > > Many thanks for your help. > > Graham > > On Sat, 21 Apr 2012 03:35:42 +1200 Ric Sherlock <tikk...@gmail.com> wrote: > > Subject: Re: [Jprogramming] Colouring dots in plot > > To: Programming forum <programming@jsoftware.com> > > Message-ID: > > <CAOoUVu8A=5MH5AvDc8iN94Qevsovr-FxTOrkK- > > qyhhjjrlv...@mail.gmail.com> > > Content-Type: text/plain; charset=ISO-8859-1 > > > > Graham, > > I think the error you are getting is because the noun defining the > > list of itemcolors to use isn't found. It seems that the name of the > > noun must be all uppercase, and must be in the copath of the jzplot > > locale so it is found while the plot is being constructed. The > > following example should work in J6, J7 (both Gtk IDE and JHS). If you > > are using JHS, try copying it into the scratch (action|scratch...) and > > then run it from there (action|scratch) > > > > require 'plot numeric' > > hue=: 4 : 0 > > y=. y*<:#x > > b=. x {~ <.y > > t=. x {~ >.y > > k=. y-<.y > > (t*k)+b*-.k > > ) > > > > noise=: 100 ((?@$ >:@+:) + -@]) 7 NB. random noise > > dat=: (noise + i.) 100 NB. data to plot > > datgrp=: <.@(%&10) dat NB. assign groups for dat > > NB. build a list of colors of about the right number (y) NB. from red > > to yellow. Name must be uppercase and NB. in the copath of jzplot > > locale (e.g. the z locale) > > MYCLR_z_=: (255 0 0,:255 255 0) hue int01 #~.datgrp > > > > pd 'reset' > > pd 'type point' > > pd 'itemcolor myclr' NB. myclr will be forced to uppercase pd > > 'pensize 4' > > NB. box into groups with x coordinate and plot them NB. in order of > > magnitude so the color progression works pd@> ;/@|: &.> (~.datgrp) > > /:~ (datgrp </. ] ,.~ i.@#) dat pd 'show' > > > > > > On Fri, Apr 20, 2012 at 10:12 PM, Graham Parkhouse > > <graham.parkho...@ntlworld.com> wrote: > > > 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 > > > > And on Sat, 21 Apr 2012 04:06:54 +1200 Ric Sherlock <tikk...@gmail.com> > wrote: > > > Subject: Re: [Jprogramming] Colouring dots in plot > > To: Programming forum <programming@jsoftware.com> > > Message-ID: > > <CAOoUVu- > > xto5dwr83twc1zadbyumo3g4s5mmck7emd8_mqmp...@mail.gmail.com> > > Content-Type: text/plain; charset=ISO-8859-1 > > > > On Sat, Apr 21, 2012 at 3:38 AM, Graham Parkhouse > > <graham.parkho...@ntlworld.com> wrote: > > > > > > 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? > > > > > > > The answer is yes (see my previous post). The colorxy_jzplot_ verb > > looks like it could be useful for building palettes. > > MYCLR_z_=: (255 0 0,:255 255 0) hue int01 #~.datgrp > > becomes: > > MYCLR_z_=: (#~.datgrp) colorxy_jzplot_ 1 0 0 ,: 1 1 0 > > > ------------------------------------------------------------- > > ---------------------------------------------------------------------- > For information about J forums see http://www.jsoftware.com/forums.htm > > ---------------------------------------------------------------------- > For information about J forums see http://www.jsoftware.com/forums.htm
-- regards, ==================================================== GPG key 1024D/4434BAB3 2008-08-24 gpg --keyserver subkeys.pgp.net --recv-keys 4434BAB3 ---------------------------------------------------------------------- For information about J forums see http://www.jsoftware.com/forums.htm