Displaying 20 results from an estimated 3000 matches similar to: "Make Multiple plots in R"
2010 Nov 19
2
Calculating distance between longitude,latitude of 2 points
Hi all,
I would like to know a way of calculating the distance between 2 points when
I already have the longitude and latitude of the points.
For example :
Point 1 : 52? 9'54.00"N 4?25'8.40"E
Point 2 : 52?27'46.80"N 4?33'18.00"E
Distance between point 1 and point in km ....
Is there any functions already available for this ?
Any help will be much
2002 Oct 02
6
help to make a map on R
Hi all,
I need a little help for construct an state's map on R.
The first problem is to get the data.
I have a datafile of longitude and latitude in the follow format:
trajectory latitude longtude
T -22.045618 -51.287056
T -22.067078 -51.265888
T -22.067039 -51.207249
T -22.059690 -48.089695
T -22.075529 -48.074608
T -22.072460 -48.044472
T -22.062767 -48.298473
T -22.077349
2004 Feb 03
4
filled maps
Hi R-Help,
I would like to make filled contour maps of ocean data overlaid by
costlines from the map package.
I can draw the filled contours and the coastlines om the same plot, but
the filled contour also covers part of the land. To get rid of that I
tried to draw a filled coastline map on top of the filled contour, but
the filled map only draws the closed contours - so most of the land is
2011 Aug 09
1
Transparent color ramp problem
Hello,
I can't seem to add transparency to any color ramp I create using colorRampPalette(). Can someone tell me if it is possible to create transparent colour ramps?
I am attempting to map shaded relief under elevation data. I know I can use the terrain.colors() with the alpha option, but I would prefer to create my own colour ramp using more vibrant colours.
My most recent attempt at
2009 Mar 03
1
behavior of squishplot in TeachingDemos
Hi list,
I wonder if anyone has had this experience with squishplot() in the TeachingDemos package.
Taking the example from the ?image help page,
library(TeachingDemos)
x <- 10*(1:nrow(volcano))
y <- 10*(1:ncol(volcano))
layout(matrix(c(1,2,3,4),ncol=2,byrow=TRUE),height=c(2,1))
## 1st plot
op <- squishplot(range(x),range(y),1)
image(x, y, volcano, col = terrain.colors(100))
par(op)
2004 May 06
1
Problem with filled.contour/image
Quick question - I am having problems creating an orographic image
(similar to volcano example). I have created a map matrix with 3 columns
and over 2million rows.
I have created the matrix as follows:
map<-read.table("map.dat",header=TRUE)
long.grid<-sort(unique(map$long)
lat.grid<-sort(unique(map$lat)
map.matrix<-matrix(map$height,nrow=length(lat.grid),byrow=TRUE)
The
2023 Feb 23
1
Palettes {grDevices} - wrong number of colors returned?
On 23/02/2023 4:36 a.m., Sigbert Klinke wrote:
> Hi,
>
> I would have expected that I get always 3 colors as result which is not
> true:
>
> hcl.colors(3, alpha=c(0, 0.5, 1)) # 3 colors
>
> rainbow(3, alpha=c(0, 0.5, 1)) # 3 colors
>
> heat.colors(3, alpha=c(0, 0.5, 1)) # 3 colors
>
> terrain.colors(3, alpha=c(0, 0.5, 1)) # 6 colors
>
>
2001 Aug 07
2
image() colors
Hi, everybody!
I am currently dealing with spatial estimation and thus writing some
smoothing algorithms. My question concerns the graphical output. I would
like my function to produce a picture of input data (X) and of estimation
results(Y). Both, X and Y are categorical variables which can take values
1,2,...,Cl. So, basically I write
foo<-function(){
....
2010 May 21
7
Provider API versioning
Hi folks,
Wondering whether I can get a quick show of hands from those of you who use
OpenLayers. The latest version of the API has some refinements for adding
the OSM layers which it would be good to take advantage of. If anyone who
uses OpenLayers is planning to upgrade from Mapstraction v1 to v2 would it
be acceptable to have to upgrade OpenLayers too? That''s assuming you
2011 Jun 07
1
error with geomap in googleVis
Hi All,
I am unable to get the plot geomap in googleVis package. data is as follows
> head(index.ret)
country ytd
1 Argentina -10.18
2 Australia -3.42
3 Austria -2.70
4 Belgium 1.94
5 Brazil -7.16
6 Canada 0.56
> map1 = gvisGeoMap(index.ret,locationvar = 'country', numvar = 'ytd')
> plot(map1)
But it just displays a blank page, showing an
2011 Jul 13
3
adding text to spplot
hi all,
I have a plot to which i would like to add text labels. And i cant find a way...here is the code :
enaD2<-idw(D2~1, loca=dva, newdata=grd)
pts = list("sp.points", dva, pch = 20, cex=1.5, col = "darkred
spplot(enaD2, "var1.pred",sp.layout=pts, main = "globina 60 cm", sub="D2",
2010 Nov 20
1
Setting a Red->Yellow->Green Color Transition in Image(...) with yellow corresponding with the Mean Value...
In the following example I would like to have the color transition from
Red->yellow->green in the image(...) function, and if possible have the yellow
be set to correspond with the mean value (for the below 75).
?
I was able to figure something like out when using filled.contour(...), e.g.
filled.contour(ak.fan, levels = c(70, 73, 76,?80, 90), color = terrain.colors)
(I still
2023 Feb 23
2
Palettes {grDevices} - wrong number of colors returned?
Hi,
I would have expected that I get always 3 colors as result which is not
true:
hcl.colors(3, alpha=c(0, 0.5, 1)) # 3 colors
rainbow(3, alpha=c(0, 0.5, 1)) # 3 colors
heat.colors(3, alpha=c(0, 0.5, 1)) # 3 colors
terrain.colors(3, alpha=c(0, 0.5, 1)) # 6 colors
cm.colors(3, alpha=c(0, 0.5, 1)) # 6 colors
topo.colors(3, alpha=c(0, 0.5, 1)) # 9 colors
R-Version and
2009 Nov 23
1
Natural colours for topographic data
Dear list members
I'm currently working on some topographic (elevation) data, and was
somewhat surprised that the 'topo.colors' and 'terrain.colors' are of
little to no use here.
The problem is that these functions only return a palette of colours;
they don't map depth values to colours. So if I plot (using 'image',
'persp' or similar functions) and
2013 Sep 22
2
colores
Como usas la función image puedes consultar la ayuda ?image o help(image) y
encontrarás el siguiente ejemplo donde se usa un diferente color Palette
(mencionada por pepeceb en su respuesta).
x <- 10*(1:nrow(volcano))
y <- 10*(1:ncol(volcano))
image(x, y, volcano, col = terrain.colors(100), axes = FALSE)
# O puedes usar directamente el número para indicar el color
image(x, y, volcano, col =
2008 Jan 04
3
Plot error
Hi all,
I'm trying to plot an svm model and I'm the following error:
> plot(model, data= dados[,-1], formula=formula(dados[,2]~dados[,3]),svSymbol = 1, dataSymbol = 2, symbolPalette = rainbow(4),color.palette = terrain.colors)
Error in terms.default(x) : no terms component
Anyone knows how to solve this???
Best regards,
Pedro Marques
2007 Oct 01
1
Graphics and LaTeX documents with the same font - multiple y-axes
Well,
I agree that plots with multiple y-axes can be very confusing but .... i am not sure that always they are also misleading .... One time i was asked to make a 2 y-axes plot, one y axes was for elevation (heights in meters) and one for rugosity (values between 1 and 2 - unitless). The idea was to visualize that for a more complex profile the rugosity is higher than for a flatter terrain. A
2007 Oct 19
1
inverser terrain.colors
Dear UserRs,
I draw filled contour plot with filled.contour function.
By default, colors of filled.contour is terrain.colors which alters
from green (the lowest level) to white (the highest level).
I want the colors to alter from white (the lowest level) to green
(the highest level).
How can I set this color levels?
Thanks in advance.
2006 Jun 27
3
how to rotate a triangle image(ZMAT) ?
Hello R users...
how to align this Zmat (triangle image) in X axis?
I would like that the triangle's base become in the X
axis and
the triangle's height become in the Y axis
Is there some trick for make this?
Thanks.
Cleber
######################## my test and try
f <- function(x,y){
z=1-x-y
z[ z < (-1e-15) ] <- NA
return( -100*x+0*y+100*z )
}
x = seq( 1, 0,
2019 Mar 15
1
Could we make filled.contour() more suitable for PDF viewers?
Note that I sent this to r-devel, yesterday.
However, it didn't appear on the mailing list.
So, I'm resending it.
Today, I plotted the following:
> filled.contour (,,z, color.palette=terrain.colors)
It looked OK, in R.
However, when I created a PDF document, the plot (and other similar plots)
had grid (and other) lines in it, that shouldn't be there.
Note that this problem is more