search for: hjust

Displaying 20 results from an estimated 72 matches for "hjust".

Did you mean: just
2016 Apr 17
0
use hjust or vjust with dendextend
...gt;% set("nodes_pch", 19) %>% set("nodes_col", c("orange", "black", "plum", NA)) ggd2 <- as.ggdend(dend2) ggplot(ggd2, horiz = TRUE, theme = NULL) My problem is that the labels overlap the dendogram leafs and I have no idea on how parameter hjust or vjust may be used to create space between label and leaf. Thanks for any help, Sergio [[alternative HTML version deleted]]
2020 Oct 04
3
Leyenda gráfico combinado
...geom_point(aes(y=Estimada), shape=21, fill="blue", color="white")+ labs(y = expression(paste("Biomasa ", (g/cm^{2}))))+ ggtitle("Espeletia standleyana")+ theme_minimal()+ annotate(geom = 'text', x = 0, y = 750, hjust = 0, label = "Biomasa=220,774(IAF)+39,759(Aprom)-163,883")+ annotate(geom = 'text', x = 0, y = 700, hjust = 0, label = "R² = 0,982 P=3,8187E-17") ¿Alguien sabe cómo hacerlo? Agradezco mucho cualquier informac...
2017 Jun 27
0
ggplot2 geom_bar label justification
...rad","Helen","Julie","Steve") Lab2=c('abracadabra','rumplestiltskin','adadf','asddsdfsdsfsds','sdfsdfsfsfs','sddf') valuex = c(3.1,2.3,0.4,-0.4,-1.2,-4.4) df1 <- data.frame(Lab1,Lab2,valuex) df1$hjust <- ifelse(df1$valuex > 0, 1.3, -0.3) df1$Lab1 <- factor(df1$Lab1, levels = unique(df1$Lab1)) df1$Lab2 <- factor(df1$Lab2, levels = unique(df1$Lab2)) ## plot 1 px <- ggplot(df1,aes(Lab,valuex,label=Lab1,hjust = hjust)) + geom_text(aes(y=0,size=5)) + ge...
2008 May 20
2
need some help in plotting xy graph
...t.theme()) else trellis.device(device, file=file, width=width, height=height, theme=celnet.theme()) } "annotate" <- function(str, ...) ## print a metadata message at the top-bottom of current trellis display { else if(n==1){ x <- 0.95 hjust <- "right" } else if(n==2){ x <- c(0.05, 0.95) hjust <- c("left", "right") } else if(n==3){ x <- c(0.05, 0.50, 0.95) hjust <- c("left", "center", "right") } x <- unit(x, &quo...
2008 May 21
2
need some help in plotting xy graph
...t.theme()) else trellis.device(device, file=file, width=width, height=height, theme=celnet.theme()) } "annotate" <- function(str, ...) ## print a metadata message at the top-bottom of current trellis display { else if(n==1){ x <- 0.95 hjust <- "right" } else if(n==2){ x <- c(0.05, 0.95) hjust <- c("left", "right") } else if(n==3){ x <- c(0.05, 0.50, 0.95) hjust <- c("left", "center", "right") } x <- unit(x, &quo...
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
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)) > mydata RowID...
2017 Nov 02
3
ggplot inside function doesn't plot
...E) png(paste("img/", X, ".png", sep="")) ggplot(d, aes(x=condition, y=count, color=condition)) + geom_point(position=position_jitter(w=0.1,h=0)) + scale_y_log10(breaks=c(25,100,400)) + ggtitle(X) + theme(plot.title = element_text(hjust = 0.5)) dev.off() } 'd' is a dataframe count condition E11.5 F20HET BA40_quant 955.9788 E11.5 F20HET E11.5 F20HET BA45_quant 796.2863 E11.5 F20HET E11.5 F20HET BB84_quant 745.0340 E11.5 F20HET E11.5 F9.20DKO YEH3_quant 334.2994 E11.5...
2017 Nov 02
3
ggplot inside function doesn't plot
...uot;.png", sep="")) >> ggplot(d, aes(x=condition, y=count, color=condition)) + >> geom_point(position=position_jitter(w=0.1,h=0)) + >> scale_y_log10(breaks=c(25,100,400)) + >> ggtitle(X) + >> theme(plot.title = element_text(hjust = 0.5)) >> >> dev.off() >> } >> >> 'd' is a dataframe >> >> count condition >> E11.5 F20HET BA40_quant 955.9788 E11.5 F20HET >> E11.5 F20HET BA45_quant 796.2863 E11.5 F20HET >> E11.5 F...
2009 May 08
1
centering axis labels in lattice
...is labels are right-justified xyplot( y ~ x, to.plot, pch = 19, ylab = "", xlab = "", cex = 3 ); # now try to set the positioning via scales xyplot( y ~ x, to.plot, pch = 19, ylab = "", xlab = "", cex = 3, scales = list( labels = to.plot$y, hjust = 0.5, vjust = 0.5 ) ); I also explored using yscale.components.default(), but specifying hjust and vjust there did not help. Any suggestions would be very much appreciated! Paul > sessionInfo(); R version 2.8.1 (2008-12-22) i386-pc-mingw32 locale: LC_COLLATE=English_United States....
2010 Jun 30
2
ggplot qplot bar removing bars when truncating scale
..._manual(values=c("darkmagenta","lightgoldenrod1")) + opts( panel.background = theme_rect(colour = NA), panel.background = theme_blank(), panel.grid.minor = theme_blank(), axis.title.x= theme_blank(), axis.title.y= theme_blank(), axis.text.y=theme_text(size=12,hjust=1), legend.text=theme_text(size=14) ) #With 3-6 Scale (Bars Deleted) p + scale_x_discrete(expand=c(0,0)) + scale_y_continuous(limits=c(3,6),breaks=seq(from=3,to=6,by=.5),expand=c(0,0)) + coord_flip() + scale_fill_manual(values=c("darkmagenta","lightgoldenrod1")) + opt...
2013 Apr 18
1
Arranging two different types of ggplot2 plots with axes lined up
...3,2003,2003,2003, 2004,2004,2004,2004,2004,2004,2004,2004,2004,2004) fc<-sample(1:1000, 50) yfc<-data.frame(year2, fc) #make test precipitation plot yp_plot<-ggplot(yp) + geom_point() + geom_line() + aes(year, y=precip) + opts(title="Site X \n ", axis.text.x=theme_text(angle=45, hjust=1, vjust=1)) + ylab("Annual Precipitation (in.) \n ") + xlab("") #make test fecal coliform plot yfc_plot<-ggplot(yfc) + geom_boxplot() + aes(x=as.factor(year2), y=fc) + opts(axis.text.x=theme_text(angle=45, hjust=1, vjust=1)) + xlab(" \n Date") + ylab("Fecal c...
2016 Apr 09
1
Run script R
....5, linetype = 1, lineend = "butt"),? ? ? rect = ? ? ? ? ? ? ? element_rect(fill = "white", colour = "black", size = 0.5, linetype = 1),? ? ? text = ? ? ? ? ? ? ? element_text(family = base_family, face = "plain", colour = "black", size = base_size, hjust = 0.5, vjust = 0.5, angle = 0, lineheight = 0.9),? ? ? axis.text = ? ? ? ? ?element_text(size = rel(0.8), colour = "grey50"),? ? ? strip.text = ? ? ? ? element_text(size = rel(0.8)), ? ? ? axis.line = ? ? ? ? ?element_blank(),? ? ? axis.text.x = ? ? ? ?element_text(family = base_family, s...
2010 Sep 01
2
ggplot2 multiple group barchart
...ot;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 <- pl + geom_bar() pl <- pl + coord_flip() pl <- pl + geom_text (aes(label=round(y,1)),vjust=0.5, hjust=4,colour="white", size=7) pl this gives me a nice barchart to compare the means of my variables "v1","v2" and "v3". my question: how do i have to proceed if i want this barchart splittet by the variable "gender". so i get two small bars for "v...
2017 Nov 02
0
ggplot inside function doesn't plot
...ot;img/", X, ".png", sep="")) > ggplot(d, aes(x=condition, y=count, color=condition)) + > geom_point(position=position_jitter(w=0.1,h=0)) + > scale_y_log10(breaks=c(25,100,400)) + > ggtitle(X) + > theme(plot.title = element_text(hjust = 0.5)) > > dev.off() > } > > 'd' is a dataframe > > count condition > E11.5 F20HET BA40_quant 955.9788 E11.5 F20HET > E11.5 F20HET BA45_quant 796.2863 E11.5 F20HET > E11.5 F20HET BB84_quant 745.0340 E11.5 F...
2023 Jun 28
1
horizontal grouped stacked plots and removing space between bars
...;), legend.title=element_blank(), axis.title.x = element_blank(), panel.grid.major = element_blank(), panel.grid.minor = element_blank(), panel.background = element_blank(), axis.ticks.x=element_blank(), axis.title.y = element_text(angle = 90, hjust = 0.5)) myplot + theme(panel.grid.major = element_blank(), panel.grid.minor = element_blank(), legend.title=element_blank(), panel.background = element_blank(), axis.title.x = element_blank(), axis.text.x=element_blank(), axis.ticks.x=element_blank(), axis.title.y = element_text(angle = 90, hjus...
2009 Sep 09
1
Xyplot, multi line title via main, all lines left justified
...rep(c(0,1), each = 5)) xyplot(y ~ t | as.factor(group), data = data.ex, main = list("Put figure caption here xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx want this line left justified" )) I must be mis-interpreting the help description for main under xyplot, and the descriptions of just, hjust, and vjust in textGrob, since manipulation of these arguments do not seem to produce the desired result of having the second line of text left-justified. Any help much appreciated. David
2006 Nov 13
1
bug in lrect [lattice]?
...y = runif(100) my.lrect <- function (xleft, ybottom, xright, ytop, x = (xleft + xright)/2, y = (ybottom + ytop)/2, width = xright - xleft, height = ytop - ybottom, col = "transparent", border = "black", lty = 1, lwd = 1, alpha = 1, just = "center", hjust = NULL, vjust = NULL, ...) { if (missing(border)) ## this line fixes it border <- if (all(is.na(border))) "transparent" else if (is.logical(border)) { if (border) "black" else "transparent" } grid:::grid.rect(x = x, y =...
2009 Oct 17
2
Putting names on a ggplot
...lt;- p + geom_vline(xintercept=month.counts) + ylab("Temperature (C)") + xlab("Daily Temperatures") p # this is where I see the problem. p <- p + geom_text(aes(x = namposts + 2.5, y = temprange[2], label = mlabs), data = year, size = 2.5, colour='black', hjust = 0, vjust = 0) p ============================================================================= DATA ============================================================================= year <- structure(list(month = c(1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L...
2009 Apr 07
2
xyplot - label one line
...r=c(1,0)), scales=list(x=list(alternating=3),y=list(alternating=3)), panel = function(x, y, groups, subscripts, ...) { panel.grid(h = -1,v = 0) ##grid.text( unit( x, "native") , unit( y, "native") , ## label =y, gp = gpar( cex = 0.9, fontface="bold"), hjust=c(1,1), vjust=c(-1,-1)) panel.superpose.2(x = x, y = y, groups = groups, subscripts = subscripts,...)}, type = c("p", "o")) [[alternative HTML version deleted]]