[R-sig-eco] wmtsa

Glen A Sargeant gsargeant at usgs.gov
Mon May 19 18:12:24 CEST 2008


#Similar to my previous example, but shaded by
#the rank of x and symmetrical about the median;
#the general point here is that you can easily
#color with respect to any numerical value you
#can associate with your data vector 

#Example data
x <- rnorm(1000,0,1)

#Index to colors to use
color <- rank(x)

#Number of colors
n.colors <- length(unique(x))

#We will use colors interpolated between these;
#will shade from chocolate to tan to green
color.scheme = c(" blue", "tan", "blue")

#Save old color palette settings
oldPalette <- palette()

#Reset color palette to levels shaded as specified
#above
newPalette <- colorRampPalette(color.scheme, space = "Lab")
palette(newPalette(n.colors))

#Plot the data; outline points
plot(x,pch=19,col=color)
points(x)

#Reset to the original color scheme
palette(oldPalette)

*************************************************
Glen A. Sargeant, Ph.D.
Research Wildlife Biologist/Statistician
Northern Prairie Wildlife Research Center
8711 37th Street SE
Jamestown, ND  58401

Phone: (701) 253-5528
E-mail:  glen_sargeant at usgs.gov
FAX:     (701) 253-5553
*************************************************



"stephen sefick" <ssefick at gmail.com> 
Sent by: r-sig-ecology-bounces at r-project.org
05/19/2008 08:41 AM

To
r-sig-ecology at r-project.org
cc

Subject
[R-sig-eco] wmtsa






I would like to change the wavCWT (package wmtsa) plot colors does anyone
know how to do this.

d = wavCWT(x)# I can provide data but it is a rather large data set
plot(d) #default color scheme does not have enough contrast

thanks

Stephen

-- 
Let's not spend our time and resources thinking about things that are so
little or so large that all they really do for us is puff us up and make 
us
feel like gods. We are mammals, and have not exhausted the annoying little
problems of being mammals.

-K. Mullis

                 [[alternative HTML version deleted]]

_______________________________________________
R-sig-ecology mailing list
R-sig-ecology at r-project.org
https://stat.ethz.ch/mailman/listinfo/r-sig-ecology



More information about the R-sig-ecology mailing list