Home > Uncategorized > Map colors

Map colors

Reader P was kind enough to make us a new color map so I promptly played around with it and other parameters. Need to figure out how to drop the labels and ticks on the “map”  map.axes() is no help.

In anycase, I had a day long struggle with my R set up,  its all fixed. old packages stuck in a user library.

So, Someone else asked for a 1 file version. See the drop box: sstcomplete. It has the new graphics in it. One complete script.  I put that together and added the “install” to the file. Delete the calls to “install.packages” IFF you already have them installed. ( I need to test for this )

NEXT, I’m going back to the Land. Some project clean up and making it all download from one file.

Categories: Uncategorized
  1. pdjakow
    August 31, 2010 at 2:42 PM


    I think that you must move ‘plotSeries’ and ‘drawGlobalbrick’ functions definitions to the top of a SSTcomplete.R file (after libraries). Without it i have ‘function not found’ error.

    Best Regards
    Piotr Djakow.

    • Steven Mosher
      August 31, 2010 at 3:08 PM

      ya Im re-running that As we type at each other. I prefer to keep all my functions in separate scripts.
      if people want to combine them thats their choice.

    • Steven Mosher
      August 31, 2010 at 3:10 PM

      Yup, just reran it. Yiu can comment out the install packages after you do it once

    • Steven Mosher
      August 31, 2010 at 3:12 PM

      I also boosted the pixel count, graphics is a time sink… hehe

  2. Steve McIntyre
    September 1, 2010 at 9:33 AM

    I have a function that colors land areas within the fields package. Nychka sent it to me a couple of years ago.

    • Steven Mosher
      September 1, 2010 at 12:36 PM

      Cool. I’m going to redo the land with raster.

      There is a function that will do ‘pointstoRaster’

      So: the station time series is held in a dataframe station ID *time
      Then you pull the lon/lat and do points to raster.. and combine stations into
      a grid structure with a ‘mean’ function. Same trick will work for icoads to grid
      but I suspect that

  3. September 1, 2010 at 10:34 AM

    What I do for maps is:
    1. Make a structure of lines to be drawn (just once):
    2. Start with
    3. lines(mp,col=”red”) # this draws the map
    4. Then use lines(), points(), text() etc

    No axis stuff, and it gets the aspect ratio right. And you can map the x-y axes consistently to any projection you want.
    In fact the mp structure has data for coloring countries etc if you want.

  4. September 1, 2010 at 12:17 PM

    In fact, if you want colored countries. instead of lines(mp,..)
    just polygon(mp,col=rainbow(20))
    or polygon(mp,col=”orange”)
    if you want land in one color.

  5. Steven Mosher
    September 1, 2010 at 12:31 PM

    Thanks nick did you have any luck running the SST stuff

  6. September 2, 2010 at 8:00 AM

    I haven’t got back to the SST stuff yet – I’ve been working on irregular gridding. Should be done soon.

  1. No trackbacks yet.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: