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

______________________________________________
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to