Re: ColorMap file question

From: Ivan Lima <ivan_at_nyahnyahspammersnyahnyah>
Date: Tue, 22 May 2007 14:18:25 -0400

  Jim,

  I have done just that. I created my own library of colormaps.
  I put all my custom colormaps in a file 'my_colormaps.py' in
  the directory '~/python' and added that directory to my
  $PYTHONPATH (setenv PYTHONPATH /home/ivan/python). Then I just
  include the line 'from my_colormaps import *' in my scripts.
  It works great, and I think this is a better solution than
  adding/changing files in the original PyNGL installation
  directories (keeps custom stuff separate from original stuff).

  Cheers,

  - Ivan

On Tue, May 22, 2007, James Boyle wrote:

> This one is probably for the developers.
> What is the relation of the color map files found in " .../
> PyNGL-1.1.0/PyNGL/ncarg/colormaps" and the names invoked when I call
> a sequence such as:
>
> rlist.wkColorMap = "amwg"
> Ngl.set_values(wks,rlist)
>
> I thought I would be clever and put a new file in this location with
> the color map I wanted but the file name could not be recognized by
> Ngl.
> OK, then just the name is in the code. So I altered the file with the
> name "amwg.rgb", but when I used amwg I got the original colors.
> Evidently, the files are not used at runtime.
> So, when do these names and corresponding colors get built in? If I
> define new map files would they be picked up after the setup.py
> install or not?
>
> It would be neat to be able to build up ones own library of colormaps
> rather then building them in the code. Building in code tends to
> scatter the definitions and having files in a central location forces
> a certain order.
>
> Thanks for any enlightenment.
>
> --Jim
> _______________________________________________
> pyngl-talk mailing list
> pyngl-talk_at_ucar.edu
> http://mailman.ucar.edu/mailman/listinfo/pyngl-talk
>

_______________________________________________
pyngl-talk mailing list
pyngl-talk_at_ucar.edu
http://mailman.ucar.edu/mailman/listinfo/pyngl-talk
Received on Tue May 22 2007 - 12:18:25 MDT

This archive was generated by hypermail 2.2.0 : Wed May 30 2007 - 16:42:34 MDT