Displaying 20 results from an estimated 10000 matches similar to: "reducing distances between tickmarks"
2010 Oct 05
2
is there a way to avoid "traveling" grid?
Hello!
If you run the whole code below, it'll produce a stacked diagram. And
it looks good - because the tick-marks are aligned with the grid.
However, if I stretch the graph window, grid becomes misaligned with
the tickmarks. Or, rather, it seems aligned for the first and the last
tick mark, but not for tickmarks in between.
Can it be addressed?
Thank you!
Dimitri
### Creating a data set
2010 Oct 04
1
adding a legend to the plot (but outside of it)
Hello!
My code below creates a data frame and a plot for it.
However, I can't figure out how to add a legend that is not ON the
plot itself, but outside of it (e.g., to the right of my graph or
below it). I tried something: I put a line par(xpd=T,
mar=par()$mar+c(0,0,0,4)) right before my plot command), but that
screwed up all my gridlines - they covered all graph and do not
coincide with
2010 Sep 27
1
stacked area chart
Dear R-ers!
Asking for your help with building the stacked area chart for the
following simple data (several variables - with date on the X axis):
### Creating a data set
my.data<-data.frame(date=c(20080301,20080402,20080503,20090301,20090402,20090503,20100301,20100402,20100503),
x=c(1.1,1.0,1.6,1,2,1.5,2.1,1.3,1.9),y=c(-4,-3,-6,-5,-7,-5.2,-6,-4,-4.9),
2010 Oct 18
0
Question about legend parameters
Hello!
The code below works - if you run it you'll see a stacked area chart
generated based on the data example.
I only have one understanding question about the legend location (the
very last snippet of code):
legend(par()$usr[2],
mean(par()$usr[3:4]),
rev(order.of.vars),
xpd=T,
bty="n",
pch=15,
col=all.colors[rev(order.of.colors)])
I see that par()$usr[2] = 14763.72
2013 Jan 29
1
points rejected as lying outside the specified window
Hello,
I am using the following code to create ppp files from csv data and map shape files, but I am getting some errors which I have been unable to fix by searching them online:
library(spatstat)
library(maps)
library(maptools)
NYC2<-readShapePoly("nybb.shp") # this is a map of the NYC boroughs without waterways and no census tract divisions (but it does include lines separating
2011 Jan 20
1
Generating time progressing line for Google Earth
Dear,
I am trying to visualise a time-progressing line (it's supposed to
represent spread patterns) using brew package and Google Earth.
The idea is to have a function which takes start and end point
geographic coordinates, as well as number of intervals to chop the path
up, and returns the collection of points segmenting this line.
Unfortunately my calculations fail for large distances,
2006 Jan 21
1
Bug in xy.coords() or documentation error?
Hi,
I noticed the following problem with xy.coords() in R 2.2.1-patched
(version info at the foot of this email) and R 2.3.0 unstable
(subversion no: r37123):
> xy.coords(x = matrix(1:20, ncol = 2))
Error in xy.coords(x = matrix(1:20, ncol = 2)) :
argument "y" is missing, with no default
> xy.coords(x = matrix(1:20, ncol = 2), y = NULL)
$x
[1] 1 2 3 4 5 6 7 8 9
2006 Apr 13
2
a question on subset a dataset
Dear R-users,
I generate a dataset "d", and want to get a subset from it.
**
*z<-rnorm(9)
coords<-cbind(x=c(1,1,1,2,2,2,3,3,3),y=c(1,2,3,1,2,3,1,2,3))
d<-SpatialPointsDataFrame(coords, data.frame (z=z[1:9]))*
The result*/dataset* is
coordinates z
1 (1, 1) 1.41173570
2 (1, 2) 0.18546503
3 (1, 3) -0.04369144
4 (2, 1) -0.21591338
5 (2, 2)
2003 Aug 06
2
Plot ticks and tick labels: thickness, colour?
I am displaying several series in one plot, and would like to make
them distinct without having to employ a legend.
I managed to color tickmarks, but have been unsuccessful with either one of
a) making tickmarks thicker (without increasing the axis at the same time).
From reading ?axis:
lty, lwd: line type, width for the axis line and the tick marks.
in would appear that I cannot
2013 Apr 26
1
[newbie] how to find and combine geographic maps with particular features?
SUMMARY:
Specific problem: I'm regridding biomass-burning emissions from a
global/unprojected inventory to a regional projection (LCC over North
America). I need to have boundaries for Canada, Mexico, and US
(including US states), but also Caribbean and Atlantic nations
(notably the Bahamas). I would also like to add Canadian provinces and
Mexican states. How to put these together?
General
2012 Oct 18
1
spTransform longlat to utm
Dear all,
I am trying to project my LongLat-maps to a plane.
The ultimate purpose is to do a search of points in vicinity of other points using overlay-commands (sp) with radius in km.
I am applying spTransform (package rgdal) and it gives my some curious results.
An example.
Let's take a point lying somewhere in Germany, zone=32U
x <- 8.968735
y <- 49.454735
After conversion I
2005 Dec 31
1
xy.coords
In ?xy.coords it says:
If 'y' is missing and 'x' is a
formula: of the form 'yvar ~ xvar'. 'xvar' and 'yvar' are used as
x and y variables.
list: containing components 'x' and 'y', these are used to define
plotting coordinates.
time series: the x values are taken to be 'time(x)' and the y
2007 Apr 03
1
which points within an ellipsoid? Sorting data in 3d
Hello,
in a three dimensional coordinate system, I'd like to find all my
experimental data points that fall within an ellipsoid around a fixed
coordinate. The fixed point is defined by (x.coord.point,
y.coord.point, z.coord.point). The coordinates of the ellipsoid are
given by the three vectors x,y,z.
In a previous version of my code, I simply used a box instead of an
ellipsoid to sort
2003 Apr 28
2
sum(..., na.rm=TRUE) oddity
Hi all,
I get two different results when using sum() and the switch na.rm. The
result is correct when na.rm=FALSE.
Linux Redhat 7.3, R version 1.6.1.
I've had no luck searching the mail archives, so I was hoping somebody
could explain/check this one for me. I will need to apply the function
to missing data, simple as it is.
Code:
x<-matrix(runif(20,0,5)%/%1,4,5) # random matrix
2005 Dec 19
1
How to draw partial grid in plot for spatial-binomial experiment?
DeaR comRades:
I have a 2D spatial binomial process as shown in the data and code below.
I am plotting the number of trials and the number of successes in the spatial
binomial experiments and would like to draw the spatial cells were the trials
and successes were counted, i.e. a partial grid in the plot only for those
cells where there is a number. The cells are 2x2 km cells. The count of
Trials
2012 Jun 04
1
Plotting with Rgraphviz
Hi All,
After a lengthy battle just to get the package installed, I am not able to
actually use Rgraphviz to generate any plots. I tried just using the sample
code in the documentation
(http://www2.warwick.ac.uk/fac/sci/moac/people/students/peter_cock/r/rgraphviz/)
and I get the following:
*> > library(Rgraphviz)
> test.matrix<-matrix(rep(c(0,1,0,0), 9), ncol=6, nrow=6)
>
2008 Oct 23
3
xy.coords in text
Hello,
I want to add text annotation about correlation on "pairs" plots. I
found that I could pass a function to the "panel" argument of pairs :
panel.annot <- function(x, y, ...) {
points(x, y, ...)
c <- cor.test(x, y)
legend("topleft", legend=substitute(rho == r, list(r=sprintf("%.2f",
c$estimate))), bty="n")
}
And then :
2010 Nov 29
1
surpressing tickmarks / labels x-as for two sets of boxplot (plotted as stacked boxplots)
Hello,
I am trying to plot two sets of boxplots together. These are estimates of two
experiments and?seven?factors.
The results of the two experiments I want to plot as boxplots stacked to each
other.
Therefore I plot first the results of the first experiment; and next with the
add option the second set of boxplots.
The boxplots are plotted at 'at = 1:7 - 0.15 for the first experiment and
2007 Oct 26
1
Help needed on calculation of Moran's I
Hi,
I am trying to calculate Moran's I test for the residuals for a
regression equation, but I have trouble converting my coordinates into
nb format.
I have used the dnearneigh() funtion now with an arbitrarily high upper
distance to make it include all plots. However, when I do the
lm.morantest() I get a Moran's I value which is the same as the expected
value and a P-value of 1.
I
2007 Aug 13
2
help with scatterplot3d
Hello,
I am having a bit of trouble with scatterplot3d().
I was able to plot a 3d cloud of points using the following code:
>my.3dplot<-scatterplot3d(my.coords, pch=19, zlim=c(0,1), scale.y=0.5,
angle=30, box=FALSE)
where my.coords is a data frame that contains x, y, and z coordinates for
grid points whose elevation we sampled.
The problem occurs when I try to add points using points3d.