Displaying 20 results from an estimated 2000 matches similar to: "Xyplot, multi line title via main, all lines left justified"
2009 May 08
1
centering axis labels in lattice
Hello,
I'm attempting to alter the location of text in my axis labels in
lattice plots and have been unsuccessful so far. For example, the
y-axis labels are always right-justified, but I would like them to be
horizontally centered.
Here's an example:
library(lattice);
# create fake dataset to plot
to.plot <- data.frame(
x = 1:5,
y = c("1\nAAA", "2\nBBB",
2024 Jun 26
2
Ayuda para hacer una lista
Hola
Soy Leticia, quería hacer una consulta al grupo a ver si me podéis ayudar.
Tengo unos datos de proteínas, el data frame es: 5 columnas iniciales que
tienen información sobre las proteínas y después las columnas con las
intensidades, de las cuales no se cuantas condiciones tienen ni cuántas
réplicas por condición.
Estoy intentando hacer un cálculo del coeficiente de variación por grupo y
2024 Jun 27
2
Ayuda para hacer una lista
Muchas fracias por la rapida contastacion Javier.
Si, ya me he dado cuenta que a veces es mas limpiar y formatear que
calcular.
Lo que yo necesito hacer no es crear un data.frame, es crear una lista por
cada grupo/condicion de muestras. Y queria hacerlo en un for loop, para que
no tuviese que indicar cuantas listas necesito si no que cogiese esa
informacion del usuario (y)
Creo que no me
2010 Sep 01
2
ggplot2 multiple group barchart
hi there.. i got a problem with ggplot2.
here my example:
library (ggplot2)
v1 <- c(1,2,3,3,4)
v2 <- c(4,3,1,1,9)
v3 <- c(3,5,7,2,9)
gender <- c("m","f","m","f","f")
d.data <- data.frame (v1, v2, v3, gender)
d.data
x <- names (d.data[1:3])
y <- mean (d.data[1:3])
pl <- ggplot (data=d.data, aes (x=x,y=y))
pl
2024 Jun 26
1
Ayuda para hacer una lista
Hola Leticia
Acomodar datos para analizar suele llevar más trabajo que el análisis.
Yo prefiero en un data.frame colocar todos los datos, porque siempre es más fácil filtrar que agregar. Cuándo tengo el data.frame con todo, realizo un plot (datos), y muchas veces en la gráfica veo cosas que me llaman la atención, de esta forma busco algo de antemano no sospechaba.
No es necesario que conozcas
2016 Apr 09
1
Run script R
hi all ,?
i have an problem in script R . But when I execute the script R I face this error . can you help me please ???error:-----------------------------------------
Error in FUN(X[[i]], ...) :?? Theme element 'text' has NULL property: margin, debugIn addition: Warning messages:1: Removed 361 rows containing non-finite values (stat_smooth).?2: Removed 361 rows containing missing values
2009 Oct 17
2
Putting names on a ggplot
Putting names on a ggplot
Can anyone suggest what I am doing wrong here. I am plotting
daily temperatures at Ottawa Ontario for 2008 broken down by
months, I seperate them by lines and want to put the names of the months
at the top of the chart ( with in the graphing area)
Everything is working as I want until I try to add the names of the months.
I did something similar a few days ago and I
2013 Apr 18
1
Arranging two different types of ggplot2 plots with axes lined up
Hi all,
I want to arrange two ggplot2 plots on the same page with their x-axes
lined up - even though one is a boxplot and the other is a line plot. Is
there a simple way to do this? I know I could do this using facetting if
they were both the same type of plot (for example, if they were both
boxplots), but I haven't been able to figure it out for two different types
of plots.
Below is my
2009 Apr 07
2
xyplot - label one line
Hi All,
I have a panel xyplot with 2 lines in each panel. I'd like to label one line
only but don't know how to do this. The code below labels both lines. Any
ideas how I could change it to show the y-values of only one of the lines?
Many thanks!
xyplot(apples + bananas ~ year | category, data=fruit, as.table=TRUE,
par.strip.text=list(cex=1.2,font="bold"),
par.settings =
2024 Jun 28
1
Ayuda para hacer una lista
Hola, que tal?
Sin saber nada mas de los datos, por lo que dices, mi aprioximacion
seria usar la funcion split, e.g.:
splittedData <- split(myData, "variablegrupo/condicion")
Esto te crearia una lista con tantos objectos como condiciones tengas.
Saludos
On 6/27/24 10:15, Leticia G Leon wrote:
> Muchas fracias por la rapida contastacion Javier.
>
> Si, ya me he dado
2011 Jun 21
2
qplot/ggplot2 Questions
I took some data from an online poll about which R GUI people used most and I
am messing around with it to learn how to use qplot. Specifically I am
making a horizontal bar graph and I have two questions.
1. The categories are ordered in rather strange way at least to me. It is
not alphabetical or ascending/descending order of votes cast so i had to
manually state the order I wanted which is
2010 Apr 28
1
Multiple cex sizes in main for xyplot?
Folks:
I would like to write two lines of text in two different font sizes (or
faces or ...) as the title ("main") of a trellis plot. The following code
does it, but not well:
xyplot((0:1)~(0:1),
main = textGrob(lab=c("Some Text","Some More Text"),y=c(.95,.8),
gp=gpar(cex=c(1.2,1.0)))
)
There is too much space between the title text and the plot. I assume
2015 Sep 04
2
Añadir escala a un mapa
Hola a tod en s,
Este es el código principal que utilizo para diseñar mi zona de estudio (cuenca):
png("mapa_zona_estudio.png", units="in", width=9, height=8.5, res=300)
# Vamos a pintar los distintos instrumentos de medida sobre el mapa (junto con éste) y añadimos leyenda
ggmap(mapa, extend='device', legend="left", base_layer=ggplot(datos, aes(x=lon,
2017 Jun 24
2
Orden de categorías en gráficos de barras (position = "stack")
??
Hola.
Estoy intentando ordenar el gráfico tal que las columnas se apilen en el
siguiente orden: debajo, los EPI; los SemiEPI en el medio y los NoEpi
arriba de todo.
Estos son mis datos:
> tabla.barras
Rangos Clase Asistentes
1 De 45d EPI 405
2 De 1a EPI 812
3 De 2a EPI 1639
4 De 3a EPI 2202
5 De 4a EPI 1994
6 De 5a EPI
2010 Feb 08
1
R ggplot2 legend text left justify
In ggplot2 how do you justify the legend text ?
In the example below the opts(legend.text = theme_text(size =
9,hjust=0)) changes the size of the text OK but it remains right
justified.
> mydata=data.frame(RowID=c("A","B","C"),Name=c("long long long long
long name","short name ","medium medium name"),Speed=c(100,140,120))
>
2010 Feb 28
1
ggplot 'annotate problem' again.
I had a problem annotating a graph last year ( see http://n4.nabble.com/Putting-names-on-a-ggplot-td907158.html#a907158 for the discussion)
Stefan (smu) provided a solution using annotate(). However I apparently did not update the graph file and,now, when I go back to the thread and try to use Stefan's solution it does not seem to work although I am sure that it did then.
The problem
2012 Aug 07
1
Styling gridExtra's title and left labels
Hi,
I'm using the gridExtra package to combine some graphs like in the
arrangeGrob example. Each of the graphs has a title but they appear much
larger than the overall combined plot title and left axis label. Does anyone
know how I can control the style / size of the gridExtra labels?
library(gridExtra)
library(ggplot2)
dsamp <- diamonds[sample(nrow(diamonds), 1000), ]
p1 <-
2017 Jun 25
3
Orden de categorías en gráficos de barras (position = "stack")
Hola,
Mira la versión de ggplot2 que estás usando por tenerla actualizada a la
última...
A mi me funciona introduciendo algún cambio salvo la última línea cuando
cambias el tema...
#-----------
Lines <- " id Rangos Clase Asistentes
1 45d EPI 405
2 1a EPI 812
3 2a EPI 1639
4 3a EPI 2202
5 4a EPI 1994
6 5a EPI
2011 Apr 03
1
another question on shapefiles and geom_point in ggplot2
Manuel:
I changed your variable names from x to 'long' and y to 'lat' on the
riqueza_out.csv file.
The code below should do what you want. Also, since the legend title is kind of
long, I broke it
down into three lines so you can see more plot area. I am cc'ing the other
groups so more people
use it if needed.
library(rgdal)
library(ggplot2)
library(sp)
library(maptools)
2009 Apr 26
7
Bumps chart in R
Hi there,
I would like to make a 'bumps chart' like the ones described e.g.
here: http://junkcharts.typepad.com/junk_charts/bumps_chart/
Purpose: I'd like to plot the proportion of people in select countries
living for less then one USD pr day in 1994 and 2004 respectively. I
have already constructed a barplot - but I think a bumps chart would
be better
# The barplot and data