Displaying 20 results from an estimated 400 matches similar to: "the proper way to use panel functions in lattice package?"
2009 Jul 15
1
Read PNG file and display with more than 256 colors RGDAL
Hello list
I am trying to use a Googlemaps tile (png file, 640 X 640 px tile) as a background to a plot and have been using the rgdal library to read in the PNG file (modified from code in the RGoogleMaps package). This works OK. My problem is is that the SGDF2PCT function in rgdal seems to be limited to 256 colors and this is introducing (I think) some degradation to the image which appears on
2011 Aug 16
1
PBSmapping, where is Ireland?!
Hi folks,
I've been using 'PBSmapping' to make a map of Europe with some labels. I've
been using the 'worldLL' PolyData, as my computer is too slow to make my own
from the GSHHS files.
The only problem is this PolyData does not seem to include Ireland. I have
no idea why this should be so, other European islands such as Sardinia etc.
are included.
2011 Dec 18
1
maptools/spatial analysis question
Hi,
I am using maptools to plot air quality data on a map. Each measurement point is mapped to a postal code area. This yields pictures with discrete borders, like so:
http://dl.dropbox.com/u/27415200/baincome.png
The problem is that the size of a postal code area doesn't mean much in this context. Moreover, only a small minority of all the postal code areas has a measurement sation. Are
2009 Apr 24
3
Text Contrast in a Plot
Hi List,
I would appreciate any suggestion on how can I make a text I’ve inserted in
a plot show some contrast? With this I mean that I have a white text on a
plot and I would like to make a tiny border around it in black, so even
being small sized and the entire graphic being small in the text page I’ll
insert it. It will be visible.
Well I tried inserting a box() function inside the text()
2010 Jul 15
4
Sweave: infelicities with lattice graphics
In a paper I'm writing using Sweave, I make use of lattice graphics, but
don't want to explicitly show (or explain)
in the article text the print() wrapper I need in code chunks for the
graphs to appear.
I can solve this by including each chunk twice, with different options,
as in
<<ortho-xyplot1-code, keep.source=TRUE, eval=FALSE>>=
library(nlme)
library(lattice)
2013 Feb 14
1
Clip a contour with shapefile while using contourplot
Hi, I have done the interpolation for my data and I was able to create the
contours in multipanel with the help of Pascal. Now, I want to clip the
contour with the shapefile. I want only the portion of contour to be
displayed which falls inside the boundary of the shapefile.
The data mydata.csv can be found on
https://www.dropbox.com/s/khi7nv0160hi68p/mydata.csv
The data for shapefile can be
2010 May 07
0
Problems with image.plot
Hi R-users,
I try to put image legend via image.plot function, but I do not know put
this in log scale. The last line of code put legend in linear scale, but I
want put this in log scale. This is a image of the ocean color web site
8-day composite L3 4KM. Anybody colud get me advise please.
This is de code...
uno<-schl[1,,]
rn_cl<-exp(range(uno,na.rm=T))
x11()
2005 May 22
2
Maps, Eastern Europe
Dear all,
I would like to employ a European map in a presentation. My idea was to
use:
library(mapdata)
map("worldHires", c("Austria", "Switzerland", "Germany"))
where I include all countries from my analysis as a vector of character
strings like in the example above. Unfortunately, I was unable to
specify the Baltic States (Latvia, Lithuania, Estonia) or
2007 Nov 13
3
ESRI Shapefile for EU-25
Hi all,
who knows how to get an ESRI Shapefile for the NUTS-2 Regions of the
enlarged European Union? Particularly I want to draw maps of Germany,
Poland, Czech Republik, Hungary and Austria. I've found Shapefiles for the
US, Russia and other countries elsewhere in the web, but for Europe it
seems really difficult.
With many thanks for any hint
Albrecht
2023 Oct 13
1
rnrfa package problems
R help email
Hello I?m trying to work my way through the rnrfa package
RJ-2016-036.pdf (r-project.org)
<https://journal.r-project.org/archive/2016/RJ-2016-036/RJ-2016-036.pdf>
I?ve got it loaded OK and can access the data by the catalogue() command -
gives me a tibble with names, grid refs etc
allStations <- catalogue()
allStations
This works OK
But when I try to run the example
2009 Aug 19
1
Lattice: Drawing a single contour line with a negative value fails
Hi everybody,
I want to add a single contourline to a levelplot. While everything
works fine if the value at which the line should be drawn is positive,
there is an error if the value is negative:
library(lattice)
my.panel <- function(..., at, contour=FALSE, labels=NULL) {
panel.levelplot(..., at=at, contour=contour, labels=labels)
panel.contourplot(..., contour=TRUE,
2007 Aug 10
1
Unexpected behavior in PBSmapping package
Using R 2.5.1 on Windows XP Professional, and PBSmapping package version
2.51, I have encountered some behavior which puzzles me. I am including
the package's listed maintainer on this email but also seek the thoughts
of the R-help community.
I have a set of EventData, which I want to plot as points, and to color
the points according to some criterion. It turns out that some of my
2020 Sep 30
0
2 KM curves on the same plot
Hi John,
Brilliant solution and the best sort - when you finally solve your
problem by yourself.
Jim
On Thu, Oct 1, 2020 at 2:52 AM array chip <arrayprofile at yahoo.com> wrote:
>
> Hi Jim,
>
> I found out why clip() does not work with lines(survfit.object)!
>
> If you look at code of function survival:::lines.survfit, in th middle of the code:
>
> do.clip <-
2004 Oct 01
3
Plotting panels at arbitrary places on a map, rather than on a lattice
I think it is easiest to describe
what I want in terms of the concrete
problem I have.
I have data from a number of countries
in each of which a sample of people was
interviewed. In presenting the results
in a forthcoming collaborative publication
much emphasis will be placed on the
multi-centre nature of the study. Although
I suspect colleagues may do this with
shaded maps I would prefer to
2009 Mar 06
1
help to use ppp in spatial analysis
Hi,
i am using spatstat package for spatial data analysis and now i have a problem to create a point pattern. The points are in file "points.txt" (first column for Latitude and second column for Longitude ) and I imported them and separated each columns in two arrays x and y. If I plots x and y ( e.g plot(x,y) ) the result appears in square area without problems and the scale is
2011 Nov 28
1
plotting multiple lines on single graph ggplot2
Hello everyone
I have some data of the following type.
100 200 300 400 500
1.1 1.2 1.3 1.4 1.5
600 700 800 900 1000
1.5 1.7 1.9 2.0 2.4
With plot() and points functions I can plot these 4 lines of data. But
I dont know how to do it with qplot or ggplot functions. The scenario
is something like this: the hundreds should appear on x-axis and the
fractional values of y axis.
Thanks alot.
MEMON
2013 Jul 16
1
Masking oceans using polypath
Hi R-help
I am trying to mask the ocean from an image plot I have made.
Here is some example code:
library(mapdata)
image(x=110:155, y =-40:-10, z = outer(1:45, 1:30, "+"),
xlab = "lon", ylab = "lat")
outline <- map("worldHires", plot=FALSE) # returns a list of x/y coords
xrange <- range(outline$x, na.rm=TRUE) # get bounding box
yrange
2010 Jun 08
1
add one point to contourplot()
Hi All,
I want to add one point to contourplot(). I used contourplot() in my code like
contourplot(z ~ a + b |c, data)
I understand there is plot.axes argument for filled.contour(), but it did not work for my code. I also tried plot() and text() for contourplot(), but got this error: "plot.new has not been called yet"
Any suggestion for adding a point in contourplot()?
Thank you very
2007 Jan 29
1
overlay xyplot on contourplot in lattice in R
Hi everybody,
I want to do a contourplot in lattice with my raw data overlaid on it(xyplot)
which seemed to be a very easy thing to do.
I've tried it in many ways, but I haven't succeeded at obtaining it.
let's say x, y, and z as the variables that comes from the data frame ''ex'':
therefore my countourplot is as followed :
contourplot(z ~ x * y, cuts=550)
I
2010 Jul 10
1
contourplot by year
Hi - I have a dataframe with 4 variables - long, lat, temp and year. I would
like to plot temperature by lat and long in contour plots by year. There
are 391 data points. When I try
contourplot(temp~long*lat|year,data=hake,cuts=10,labels = TRUE,contour =
TRUE,pretty = TRUE,region=TRUE)
I get plots with dots around by data, but not contour lines or filled in
regions.
I have also used the