search for: lineheight

Displaying 20 results from an estimated 28 matches for "lineheight".

2009 Aug 07
1
lattice dotplot: line height for multi-line labels
...he dotplot produced by library(lattice) aa <- c('A'=10,'B\nb'=20,'C'=30) dotplot(aa) I would like to control the vertical separation between 'B' and 'b' in the second label on the y-axis. For multi-line axes labels, line height is controlled by the 'lineheight' elements of the 'par.ylab.text' and 'par.xlab.tex' lists provided by trellis.par.get(). However, 'lineheight' is not available in 'axis.text' list retuned by trellis.par.get(). Does lattice provided a 'lineheight' parameter to control line-heights i...
2007 Oct 31
1
Lattice: par.ylab.text alpha ?
Hi all, I've got R for windows 2.3.1 I'm trying to modify my lattice histograms. The following does reset the y-label to blue, but I cannot turn off the label (alpha=0), nor shift label position (I'm assuming that is what lineheight is for). Is 'lineheight' the equivalent of 'line' in mtext? Am I erring somehow? Thanks! trellis.par.set(list(par.ylab.text=list(col='blue'))) #<- works trellis.par.set(list(par.ylab.text=list(alpha=0))) #<-no change, i.e. label still there trellis.par.set(list(par...
2016 Apr 09
1
Run script R
...t"),? ? ? 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, size = base_size * 0.7, lineheight = 0.8, v...
2009 Mar 10
1
Centering multi-line strip text in lattice
...ot;adj" argument to par.strip.text doesn't seem to do much. Suggestions? a=data.frame( x=rep(1:10,2) ,y=rep(1:10,2) ,z=rep(c('First Line\nLonger Second Line (1)','First Line\nLonger Second Line (2)'),each=10) ) xyplot( y~x|z ,data=a ,par.strip.text = list(cex = .75, lineheight=1, lines = 2, adj=.5), ) -- Mike Lawrence Graduate Student Department of Psychology Dalhousie University Looking to arrange a meeting? Check my public calendar: http://tinyurl.com/mikes-public-calendar ~ Certainty is folly... I think. ~
2006 Jan 26
2
footnote in postscript lattice
I would like to add a footnote to this graph but do not see a "footnote" command in the package:lattice documentation. I would like to note the "span=.8" as the footnote. postscript(file= ?C:/Documents and Settings/dsonneborn/My Documents/Slovak/output/pcb_tables/smooth_PCB_lines_four.ps?, bg=?transparent?, onefile=FALSE, pointsize=20,paper=?letter?, horizontal=TRUE,
2001 Sep 21
2
new versions of grid and lattice
...earing your hair out wondering why some strange effect is occurring. 7. Changed frames and packing to use the new "grobwidth" and "grobheight" units. This fixes some problems with frames and packing. 8. Fixed a bug where the gpar settings for "fontsize" and "lineheight" _within a grob_ would not affect the location or size of the grob if they were specified in "lines" or "char" units. This required adding new "mylines" and "mychar" units (alternative suggestions for names welcome !) so that you can specify...
2001 Sep 21
2
new versions of grid and lattice
...earing your hair out wondering why some strange effect is occurring. 7. Changed frames and packing to use the new "grobwidth" and "grobheight" units. This fixes some problems with frames and packing. 8. Fixed a bug where the gpar settings for "fontsize" and "lineheight" _within a grob_ would not affect the location or size of the grob if they were specified in "lines" or "char" units. This required adding new "mylines" and "mychar" units (alternative suggestions for names welcome !) so that you can specify...
2005 Sep 07
2
Leading in line-wrapped Lattice value and panel labels
Version 2.1.1 Platforms: all What is the trellis parameter (or is there a trellis parameter) to set the leading (the gap between lines) when long axis values labels or panel header labels wrap over more than one line? By default, there is a huge gap between lines, and much looking and experimentation has not revealed to me a suitable parameter to adjust this. Tim C
2011 Apr 25
0
Problem with grid's text-based units and TrueType fonts
...tch.pdf" is too small. Why is this the case? I'm using R-2.13.0 (32bit) on Windows 7. Thanks a bunch. Cheers, Al --- library(cairoDevice)library(grid) Cairo_pdf("SizeMismatch.pdf",11,8.5,pointsize=10)pushViewport(viewport(gp=gpar(fontfamily="Arial",font=1,fontsize=8,lineheight=0.9)))grid.text("The quick\nbrown fox\njumps\nover\nthe lazy dog")grid.rect(width=0.5,height=unit(5,"lines"))dev.off() pdf("SizeMatch.pdf",11,8.5,pointsize=10)pushViewport(viewport(gp=gpar(fontfamily="Times",font=1,fontsize=8,lineheight=0.9)))grid.text("...
2012 Jan 31
1
R help, labeling the tick marks as I want
..., 186Q4, 1999Q2, 2011Q4. With all respect to generality, could you please simply tell me the code to achieve this in the context of this problem? I learn programming by example and will not be able to understand this: ltext(x, y = NULL, labels = seq_along(x), col, alpha, cex, srt = 0, lineheight, font, fontfamily, fontface, adj = c(0.5, 0.5), pos = NULL, offset = 0.5, ..., identifier, name.type) Here's what I have: xyplot(share ~ ec, data=Cur, xlab="Years", ylab="Currency's Share of Nominal GDP (Currency/GDP in a given year)", main="The Share of Cur...
2011 Nov 17
1
Introducing \n's so that par.strip.text can produce multiline strips in lattice
..."v.names", "idvar", "timevar"))) > On which I want to run barchart(X03/1000~time|Indicator, data=imports[which(imports$time!=1),], horiz=F, scales=list(x=list(rot=45,labels=paste("Mar",2007:2011))), par.strip.text=list(lineheight=1,lines=2)) Many thanks, Ashim. [[alternative HTML version deleted]]
2008 Feb 13
1
changing scroll bar behavior
...user presses up/down arrows on the scroll bar. Specifically, I''d like to be able to set the number of pixels that scrollTop changes by when this happens. I have a div with no content that I set a height equal to the number of discrete positions I need to scroll through. I then tried to set lineHeight and fontSize to 1 and 1px respectively. This works on a mac with FF, but on a PC with FF it returns a delta of 2px on each scroll event. I would be fine with accepting the scrollTop deltas that the browser defaults to if there was some way to read them. I can''t detect when the user presses...
2001 Nov 27
1
What name-value pairs can be used in gpar()?
To use grid graphics with lattice, the help for gpar indicates that any number of named arguments can be specified but where do we find what names make any sense? I have ascertained that fontsize is given in points such as one would use in a postscript device argument and uses that same name. It's not as I'd have thought, something corresponding to cex in regular par() settings.
2009 Aug 25
2
allowing line wrap for long strip text in xyplot (lattice)
...hrough par.strip.text, has some simple way of allowing it to do intelligent line wrap. I have searched high and low, but have not figured this out: - I have read the lattice documentation but haven't quite figured out from that what I should do - I have tried using lines=2 in par.strip.text and lineheight=2 but the former appears to change the height of the strip area without forcing line wrap, and the latter as I understand it controls spacing between lines - I have tried workarounds like using cex=0.2 in par.strip.text to make the text really small, but it gets hard to read; and I have tried abbre...
2009 Mar 05
1
is there any option like cex.axis in ggplot2?
Dear list,   I made boxplots using ggplot and want to control for x- and yaxis. Using "plot" I can do it by setting cex.axis equally to any size but can't figure out how to do it with ggplot.     ggplot(dat, aes(x = factor(time), y = volume)) + opts(axis.title.x=theme_text(size=8),axis.title.y=theme_text(size=8)) + geom_boxplot() + geom_jitter(aes(colour = id))+labs(x =
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
2009 Jan 24
2
ggplot2 - how to change location / position of wind rose axis labels?
...vies, aes(x = rrating, fill = budgetq)) doh + geom_bar(width = 1) + coord_polar() #Now with my theme (hacked from theme_bw) getting close to what I need theme_bwdn<-function (base_size = 12) { structure(list(axis.line = theme_blank(), axis.text.x = theme_text(size = base_size * 1, lineheight = 0.9, vjust = 1), axis.text.y = theme_blank(), axis.ticks = theme_segment(colour = "black", size = 0.2), axis.title.x = theme_blank(), axis.title.y = theme_blank(), axis.ticks.length = unit(0, "lines"), axis.ticks.margin = unit(0, "lines"), legend.ba...
2011 Nov 18
1
Drawing ticks in the 3rd and 4th row of a lattice
...ce for me. I am running this command : - barchart(X03/1000~time|Company, data=df1[which(df1$time!=1),], horiz=F, scales=list(x=list(rot=45,labels=paste("Mar",c("07","08","09","10","11")))) ,par.strip.text=list(lineheight=1,lines=2,cex=.75), ylab = "In Rs. Million",xlab="",layout=c(3,4),as.table=T,between=list(y=1)) where my data is : - > dput(df1) structure(list(Company = structure(c(9L, 7L, 1L, 6L, 8L, 4L, 2L, 5L, 11L, 10L, 9L, 7L, 1L, 6L, 8L, 4L, 2L, 5L, 11L, 10L, 9L, 7L, 1L, 6...
2009 Apr 07
1
change inter-line spacing in grid graphics - how to?
I am trying to change the inter-line spacing in grid.text(), but I just don't find how to do it. pushViewport(viewport()) grid.text("The inter-line spacing\n is too big") popViewport() Can anyone help? TIA, Mark
2013 Aug 22
0
Close with a ggplot chart but need a little assistance
..._fill_manual(values=c("#BED2FF","#0070FF","#004DA8")) + coord_polar(theta="y") + xlab('') + ylab('') + labs(fill='Goal') + theme( plot.title = element_text(lineheight=.8, face="bold"), panel.background = element_rect(fill = "transparent",colour = NA), panel.grid.minor = element_blank(), panel.grid.major = element_blank(), strip.background = element_rect(fill = "transparent&quo...