Displaying 8 results from an estimated 8 matches for "cal_dat".
Did you mean:
call_dat
2011 Sep 15
1
Colour code y-axis labels on a dot plot
...nks
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 variable
#----------------------------------------------------------------------------------------
Cal_dat <- read.table("Calibration2.dat",header = TRUE,sep = "\t",)
## set up plotting colours
#----------------------------------------------------------------------------------------
# Colours for the six commodity
col.pat<-c("violet","cyan","green&quo...
2011 Sep 01
1
Background fill and border for a legend in dotplot
...d do this have this capablity but not
sure how the syntax works in this case
###### initalise
library("lattice")
library(latticeExtra) # for mergedTrellisLegendGrob()
##read the data to a variable
#----------------------------------------------------------------------------------------
Cal_dat <- read.table("Calibration2.dat",header = TRUE,sep = "\t",)
## set up plotting colours
#----------------------------------------------------------------------------------------
col.pat<-c("violet","cyan","green","red","blue&quo...
2011 Aug 19
2
Auto key legend does not match plot
...he
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 <- read.table("Calibration2.dat",header = TRUE,sep = "\t",)
dotplot(reorder(Label.yr, Resc_Gt)~ Resc_Gt,groups=Commodity,
data=Cal_dat,cex=1.5, pch=19,aspect="xy",
auto.key=list(space="right",title="Commodity"))
Any assistance appreciated
htt...
2011 Aug 25
1
Sorting order of reorder with multiple variables
...assistance greatly appreciated (Data file is attached)
(out of interst this code also has a very neat solution for plotting two
different keys - code by Deepayan Sarkar)
## initalise
library("lattice")
library(latticeExtra) # for mergedTrellisLegendGrob()
##read the data to a variable
Cal_dat <- read.table("Calibration2.dat",header = TRUE,sep = "\t",)
## set up plotting colours
col.pat<-c("violet","cyan","green","red","blue","black","yellow")
sym.pat<-c(19,20,21)
#list(levels(Cal_dat$Yea...
2011 Aug 21
1
Dot plot with two grouping variables concurrently
...points by a variable called 'Commodity' but would like
have different symbols to refelect a second variable called 'Year' (say
square, triangle and circle for different years).
My code so far is as follows:
## initalise
library("lattice")
##read the data to a variable
Cal_dat <- read.table("Calibration2.dat",header = TRUE,sep = "\t",)
## set up plotting colours for the fills
col.pat<-c("violet","cyan","green","red","blue","black","yellow")
##set up the plot key to be insi...
2011 Sep 10
0
Mutiple vertical reference lines with a dotplot
...d
as well!
Thanks in advance for any pointers
MarkM
(current code below and data attached)
library("lattice")
library(latticeExtra) # for mergedTrellisLegendGrob()
##read the data to a variable
#----------------------------------------------------------------------------------------
Cal_dat <- read.table("Calibration2.dat",header = TRUE,sep = "\t",)
## set up plotting colours
#----------------------------------------------------------------------------------------
# Colours for the six commodity
col.pat<-c("violet","cyan","green&quo...
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),
cex=sym.siz,
col = "black",
fill = col.pat,
alpha=0.6,...
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,
pch_var = factor(Year),
xlab_var = factor(Company),
pch = c(21, 22, 23),
cex=sym.siz,
col = "black",
fill = col.pat,
alpha=0.6,...