Dear Jim, Good news to me!! Welcome. I am fine. The code elegantly displayed the color.
I also tried to adjust the line: draw.circle(lonmids[lon],latmids[lat],radius=sqrt(counts[lat,lon])/100, 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 Ogbos On Thu, Dec 13, 2018 at 9:04 PM Jim Lemon <drjimle...@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 ______________________________________________ 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.