Student Support Forum
-----
Student Support Forum: 'change the range of ColorData' topicStudent Support Forum > General > Archives > "change the range of ColorData"

Next Comment >Help | Reply To Topic | Post New Topic
Author Comment/Response
Florent
07/03/08 3:04pm

Hi,

By default, the range of ColorData["GrayTones"] is {0,1} such that 0 is black and 1 is white. I would like to change this range from {-10,10} (say). So, -10 is black and 10 is white.
I've tried ColorDataFunction[{-10, 10}, ColorData["GrayTones", "Panel"]] which returns a good results in a notebook, but when I try to plot something like this :

Export[prefix <> ".snapshot." <> snap <> ".vz." <> colorscheme <>
".png", ListDensityPlot[datavz, AspectRatio -> Automatic,
Axes -> False, ColorFunction -> ColorDataFunction[{-10, 10}, ColorData["GrayTones", "Panel"]],
Frame -> False, PlotRange -> All, ImageSize -> Large]];

I get the following error :
RuleDelayed::argr: RuleDelayed called with 1 argument; 2 arguments \
are expected. >>
ListDensityPlot::color: ColorDataFunction[{-10,10}...is not a valid color or gray-level specification. >>

So, how do I change correctly the range of any color scheme in order to plot (here ListDensityPlot) something ?

Thank you by advance for your help,
Florent


URL: ,

Subject (listing for 'change the range of ColorData')
Author Date Posted
change the range of ColorData Florent 07/03/08 3:04pm
Re: change the range of ColorData Forum Modera... 07/06/08 12:10pm
Re: Re: change the range of ColorData Florent 07/06/08 4:41pm
Re: change the range of ColorData Forum Modera... 07/06/08 8:55pm
Re: Re: change the range of ColorData Florent 07/07/08 11:35am
Next Comment >Help | Reply To Topic | Post New Topic





 © 2008 Wolfram Research, Inc.  Terms of Use  Privacy Policy