Quantcast
Channel: Active questions tagged r - Stack Overflow
Viewing all articles
Browse latest Browse all 201867

Customize Legend with discrete Ddta

$
0
0

I have a data whose value ranges between (Min = -3.686638e+18, Max= 1.647103e+17). I want a plot where the values below zero (0) should be shown in one color while the values above zero (0) to (1.647103e+17) should be divided into 15 classes (colors/hue). I tried plot, levelplot and spplot but unable to achieve the task.

> plot( data,col=rev(heat.colors(8, alpha = 1)) ,zlim=c(-3.686638e+18, 1.647103e+17))
> levelplot(data,labels = list(at = seq(-3.686638e+18, 1.647103e+17, 7.70E+16)))
> spplot(cropped2,labels = list(at = seq(0, 1.647103e+17, 7.70E+16))

How to achieve the goal?


Viewing all articles
Browse latest Browse all 201867

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>