search for: markm0705

Displaying 13 results from an estimated 13 matches for "markm0705".

2011 Aug 19
2
Auto key legend does not match plot
Dear R-help members. I am an 'R-learner' (about 6 hours so far) using the lattice library to create a ranked dotplot and am colour coding the dots by a variable called "Commodity". However when i use autokey to make a legend the size (cex) and symbol (pch) do not match what is on the dotplot. Code is below and image attached library("lattice") Cal_dat <-
2011 Nov 23
2
Looping and paste
Dear R helpers I'm trying to make up some labels for plot from this vector BndY<-seq(from = 18900,to= 19700, by = 50) using Ylab<-for(i in BndY) {c((paste(i," to ",i+50,"mN")))} but the vector created is NULL However if i use for(i in BndY) {print(c(paste(i," to ",i+50,"mN")))} I can see the for loop is making the labels I'm looking for
2011 Sep 15
1
Move the main titel to the left of the plot
Dear R helpers I wish to move the main title, which appears on a dotplot to be right aligned with the left axis. Is there are parameter associated with dotplot 'main' that allows the title to be placed where I want it? Code snippet relating to dotplot is below. with(Cal_dat, dotplot(reorder(paste(Mine,Company), Resc_Gt) ~ Resc_Gt, fill_var = Commodity,
2011 Oct 04
1
Plotting a polygon with xyplot
Dear R helpers I would like to plot a string of points as a polygon in xyplot. I'm a bit lost as to how to get the points plotting in the correct order. I would also like some hints on how to render or fill the polygon. Scrpt below and data file attached Thanks Markm library("lattice") # set size of the window windows(height=7, width=10,rescale=c("fixed"))
2011 Sep 15
1
Move the x-axis labels to the top of the dotplot
Dear R helpers I would like to move the x-axis labels, which plot automatically at the base of a dot plot to the top of the plot. Is there a way to do this? Code snippet below with(Cal_dat, dotplot(reorder(paste(Mine,Company), Resc_Gt) ~ Resc_Gt, fill_var = Commodity, pch_var = factor(Year), xlab_var = factor(Company), pch = c(21, 22, 23),
2011 Aug 25
1
Sorting order of reorder with multiple variables
I've been building a ranked dot plot for several days now and am sorting the data using the reorder command. What I don't understand is how reorder works when mutiple varibles are plotted by grouping. In the example below I'm using re-order to sort by a variable name Resv_Prop, but I'm plotting up to three different values of Resv_prop (different Year values) for each factor.
2011 Sep 01
1
Background fill and border for a legend in dotplot
Dear R help group I've been working on this plot for a while now and now getting around to the minor adjusments. I would like to be able to put a border and background fill around the legend in this plot. I understand the legend 'bty' should do this have this capablity but not sure how the syntax works in this case ###### initalise library("lattice")
2011 Sep 15
1
Colour code y-axis labels on a dot plot
Dear R helpers I would like to be able to colour code the y-axis labels on a complex dot plot by a variable known as company (of which there are only two). The code is below and data attached. Thanks MarkM library("lattice") library(latticeExtra) # for mergedTrellisLegendGrob() # set size of the window windows(height=10, width=7,rescale=c("fixed")) ##read the data to a
2011 Sep 16
1
Move the x label to the top of an lattice plot
Dear R helpers With some help from R-help I've moved the x-scale to the top of a lattice plot using...'alternating' scales = list(x = list(log = 10),alternating=2), but now I cannot seem to find a way to move the x-axis label to the top ? Thanks -- View this message in context: http://r.789695.n4.nabble.com/Move-the-x-label-to-the-top-of-an-lattice-plot-tp3819397p3819397.html
2011 Nov 07
0
Adding lines to scatterplot odd result when creating multiple plots
Dear R helpers I'm attempting to create a matrix of scatterplots with X-Y mean lines and regression lines added to each plot in the matrix. I have managed to create the first plot I would like using scatterplot but have run into an odd result when I use par() to set up the page to take multiple plot. Specifically, the mean and regression lines appear to plot in the second plot window, not
2012 Jan 24
0
Self organising map - label the best matching unit
Dear R helpers I'm experimenting with the 'kohonen' package and have two questions. I've been following examples in the package manual and the paper from the Journal of Geostatistical software (October 2007, Volume 21, Issue 5.). I've set up a file with the 'animals' data (see attached file) which I used test a SOM routine I wrote in Fortran some years ago. The
2011 Sep 10
0
Mutiple vertical reference lines with a dotplot
Dear R helpers I would like to plot vertical reference lines for yearly averages the variable being plotted. In this case there are three years 2002, 2009 and 2010 for a variable Resc_Gt. I've attempted to get the 2002 mean plotting (2.27) using the 'abline' command but no joy. Ideally I would like to be able to compute and plot the means of the three years automatically using a
2011 Aug 21
1
Dot plot with two grouping variables concurrently
Dear R help(ers). I'm an R-learner (about 10 hours now) trying to make a ranked dot plot where the symbols are coded by two variables concurrently. I'm trying to use Deepanyan Sarkar's book 'Lattice' as a guide but get the feeling it is a bit advanced for my level of understanding. I have three questions Q1. Right now I like to know how to get the dual coding working