Displaying 20 results from an estimated 200 matches similar to: "Move the x-axis labels to the top of the dotplot"
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 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 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 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 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 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 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
2013 Nov 19
1
como agrego una linea dibujada con abline() en la leyenda de un grafico ?
Estimado Eric
En Hmisc la función labcurve puede ser útil, en todos casos crear una
curva con valores constantes, habría que intentar, pero labcurve en
algunos ejemplos en mi computadora no anda.
Ayer envié dos correos, el primero era de latticeextra, usted nombra
lattice, pero podría funcionar, en latticeextra:
## horizontal and vertical lines
xyplot(ysim ~ xsim) +
layer(panel.ablineq(v
2008 Mar 23
2
ggplot2 - legend for fill coulours
Dear All,
I am trying to build a stacked bar plot, where I define the colours to use.
I have asked this before, and I was using a solution in
http://thread.gmane.org/gmane.comp.lang.r.general/100649/focus=100673
(thanks, Thierry).
However, it looks this works only when the data are in the sequence
of the levels in the factor defining the fill colours. When the
sequence is different, the
2009 Mar 23
1
changing order of lattice plots
Hi,
This is another question relating to my 2 factor figure.
densityplot(~End-Begin | Type * Chromosome, data=Mon, layout=c(5,12),
xlab="Element Length",type="percent", col="grey60",
strip=strip.custom(style=3, bg="grey90", par.strip.text=list(cex=0.5)))
I would like to flip the plot so those at the bottom are at the top and
so on. I have tried using a
2012 Apr 25
1
FW: Combined grouped and stacked bargraph
Dear R list,
It appears that my request from yesterday got a bit garbled. I have
tried to rephrase and retype it - please let me know if you can help me
- I am having some trouble drawing a bar-graph with two groups, both of
which are stacked.
I would like to plot the conservation status according to two
classifications (i.e. my groups - IUCN status and national status), and
for each of those
2012 Apr 24
2
Combined grouped and stacked bargraph
Dear R list,
I am having some trouble drawing a bar-graph with two groups, both of
which are stacked.
A sample of my data (IUCN and national conservation status for marine
and terrestrial species) look like this:
Status
IUCN Terrestrial
IUCN Marine
National CS Terrestrial
National CS Marine
NE
168
69
16
69
LC
41
6
148
6
NT
5
4
7
4
VU
4
2
7
2
EN
4
2
4
2
CR
1
2012 Dec 12
1
Problems with plot maps
Hello,
I need plot map using ggplot()
I use such code:
library("ggplot2")
library(cshapes)
cshp.data <- cshp()
map <- cshp.data[cshp.data$COWCODE==369,]
map_mp<- list(
geom_polygon(aes(long, lat, group = group), data = map, fill = "grey70",
colour = "grey60", inherit.aes = FALSE, show_guide = FALSE),
scale_x_continuous("",
2012 Mar 07
1
confidence intervals in dotplots in a for loop
# I have some population estimates and confidence intervals for various
size classes
# of animals captured with two gear types. I'd like to plot the
estimates along with
# the 90 and 95% CI's by size class for each gear type.
# The data can be read in as:
estimates <-
c(67.42,30.49,32.95,23.53,10.26,6.03,23.53,0.93,50.72,24.2,25.84,18.54,
2013 Nov 19
2
como agrego una linea dibujada con abline() en la leyenda de un grafico ?
Eric
Recordé un ejemplo rápido
## Setup up coordinate system (with x == y aspect ratio):
plot(c(-2,3), c(-1,5), type = "n", xlab = "x", ylab = "y", asp = 1)
## the x- and y-axis, and an integer grid
abline(h = 0, v = 0, col = "gray60")
text(1,0, "abline( h = 0 )", col = "gray60", adj = c(0, -.1))
abline(h = -1:5, v = -2:3, col =
2013 Jun 24
2
Dibujar rectas sobre varios un grafico multipanel
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Estimado Javier, adjunto el grafico retocado con GIMP, borre las lineas
que sobran en cada panel. Obviamente, no es la idea hacerlo de este
modo, sino con R, pues quiero cambiar el color de la recta y hacer
varios otros graficos, cuya edicion manual requeriria mucho tiempo.
Espero entiendas mejor mi explicacion ahora. Cada una de esas rectas es
un
2012 Feb 07
3
Lattice - different axis length
Dear all,
I have a question about the lattice package, more specifically about the
control of the x-axis length in the different panels. I use the following
code to make the stacked barchart:
barchart(country ~ climatechangefocalpoint + meteorologyservice +
adaptationorvulnerability + cdmcarbonmarkets + energy +
aviationmaritimetransport + forestry + pressofficer|period, data=graph5,
2009 Mar 23
1
lattice multipanel strip placement - with two factors
Hi,
I'm making a multipanel lattice densityplot figure with 2 factors (3 and
20 classes in each factor) with the following statement (the
type="percent" is there to prevent plotting the actual points which
detract from the figure - is there another way of doing this?):
densityplot(~End-Begin | Type * Chromosome, data=Mon, layout=c(5,12),
xlab="Element
2013 Jun 24
0
Dibujar rectas sobre varios un grafico multipanel
Eric
En http://www.inside-r.org/packages/cran/latticeExtra/docs/panel.lmlineq
utilizan una diferencia, panel.ablineq en lugar de abline.
¿funcionará con ese cambio?
Javier Marcuzzi
-----Original Message-----
From: neo
Sent: Monday, June 24, 2013 4:49 PM
To: "Marcuzzi, Javier Rubén" ; Lista R
Subject: Re: [R-es] Dibujar rectas sobre varios un grafico multipanel
-----BEGIN PGP
2009 Apr 22
1
converting histogram to barchart
Hi list,
After a lot of tweaking i have managed to create a histogram with an
overlaying density plot. The histogram shows a sample of birth weights
of babies and the density plot shows birth weights from a much larger
reference populaton. My data is divided in 0.1 Kg bins so in the code
below binweigh=0.1.
The trouble with the current graph is that it is not very clear since
the density plot