[R] Plotting Very Large lat-lon data in x-y axes graph: SOLVED

Ogbos Okike giftedlife2014 @ending from gm@il@com
Fri Dec 14 12:38:33 CET 2018

Dear Jim,
Good news to me!! Welcome.

I am fine. The code elegantly displayed the color.

I also tried to adjust the line:
    border=countcol[lat,lon],col=countcol[lat,lon]) in order to reduce
the radius of the circle in order to plot the whole data.

I am really really grateful. I will immediately include the result in
a draft manuscript to Astrophysical Journal.

With the warmest regards

On Thu, Dec 13, 2018 at 9:04 PM Jim Lemon <drjimlemon using gmail.com> wrote:
> Hi Ogbos,
> Back on the air after a few days off. I don't have your data ("QUERY
> 2"), but I think this will fix your problem.
> library(maps)
> map("world")
> box()
> library(plotrix)
> color.legend(-180,-150,100,-130,legend=c(0,25000,50000,75000,100000),
>  rect.col=color.scale(1:5,extremes=c("blue","red")),gradient="x")
> Notice that I have swapped the "yb" and "yt" values so that they are
> in increasing order. If they are reversed, the numbers will appear
> within the color bar. Also you don't need to call color.gradient, just
> pass the output of a five increment color scale from blue to red (or
> whatever you like) to the rect.col argument.
> Jim

More information about the R-help mailing list