similar to: Keeping lattice plot axes in the same place when legend sizes vary

Displaying 20 results from an estimated 20000 matches similar to: "Keeping lattice plot axes in the same place when legend sizes vary"

2008 Nov 07
0
barplot can put legend in wrong place, request option to override that (PR#13265)
This in an enhancement requestion, to add the capability to pass arguments through barplot() to legend(). I've created a version that does this. # Run this code; notice that the legend # is superposed over one bar: barplot(height = cbind(x = c(465,91) / 465 * 100, y = c(840,200) / 840 * 100, z = c(37,17) / 37 * 100), beside = FALSE, width =
2002 Sep 10
4
legend outside axes of image or other plot
I have tried and tried unsuccessfully to place a legend outside the plot frame of a graph. This would allow me to draw a legend for an image() plot. But any legend I add is cut off outside the axes. Is there a way of doing this? Thanks for any advice on how to make this work (I'm using R1.5.1 with Windows 2000). Richard Condit Smithsonian Tropical Research Institute Unit 0948 APO AA
2008 Apr 10
6
How to create a legend without plot, and to use scientific notation for axes label ?
Hi, I have a 3 by 2 plots per page, and would like to place a legend on the last region. How to do that ? Also, is there any way to specify scientific notation for axes label ? [[alternative HTML version deleted]]
2007 Sep 08
1
ggplot legend consolidation
Hello Everyone, I have recently been introduced to the ggplot package by Hadley Wickham and must say I am quite impressed so far at how easy it is to make attractive plots, but one thing I am struggling over is how to consolidate legends. I have 3 plots that I would like to put on a single page and all 3 map the same dimension of the data to the colour aesthetic. Right now, when I plot all
2012 Nov 21
1
[lattice] print only legend
Is it possible to plot (and save) only the legend of a lattice plot? Of course I could make the axes and axis labels transparent and use an empty panel function, but additionally to being a very "dirty" solution, there would be still a lot of free space on the plot, while I would like to save only the legend as a separate plot without any white space around it. Is there a (nice) way to
2003 Oct 19
0
Oceanographic lattice plots
System info: Red Hat 9.0 R Version 1.8.0 ESS 5.1.21 Emacs 21.2.1 ------------------- Hello I've been working with Paul Murrell here in New Zealand to develop plots of temperature and density profiles at 22 stations spanning a frontal zxone, and then overlaying the isothermal and mixed layer depths (similar to Kara et al. 2003 JGR Oceans 108(C3) pg. 24-5, figure 2). Paul Murrell has a
2007 Mar 25
1
controlling panel.width and panel.height in viewports
Dear all, I'm trying to get a series of lattice levelplots to appear in viewports in a particular way but struggling to exert fine control over their appearence. There are two conditions: (a) I only want the levelplot to appear (I don't want axes, colour key, etc) in the viewport and (b) I want the levelplot to expand to the maximum allowable space in the viewport while observing
2011 Nov 15
1
grid.arrange, grid.layout - legend, global y axis title
Hello, I created several plot with ggplot2 dev mode. Now I want to combine the plots in a grid e.g. 2x2 with a fixed size of the output. What I am doing at the moment is: grid.newpage() pushViewport(viewport(layout = grid.layout(nrow=2, ncol=2, widths = unit(c(7.5,6.5), "cm"), heights = unit(rep(5, 2), "cm")))) print(plot1, vp = viewport(layout.pos.row = 1,
2008 Apr 12
1
ggplot2 - plot with only legend?
I just found out that this message got scrambled with other threads, so I trying to re-send... Dear R'ers, I am trying to build a composite plot (with several plots in one figure). I have tried, but I cannot use facetting, as I need to customize each plot using grid. Since all the plots are the same (with different data, but same layout and categories), I would like to have only one legend,
2008 Dec 02
1
legend idea for latticeExtra
Dear list, I've written a small utility function to add arbitrary legend(s) to a lattice graph (or a combination of them), much like the legend function of base graphics. I though perhaps it could be useful to someone else, or improved by suggestions. I understand this goes against the lattice paradigm somewhat, in that you short-cut the link between group variables and the
2013 Jan 26
2
different legends in lattice panels
Hi listers, I want to make lattice plots xyplots with the indication of legends inside each panel with only the points and the lines actually ploted inside each given panel according to the group(ing) factor. The code below shows what I have achieved so far and I hope will make clear what I want to have. It seems to me that my solution is a very "dirty hack" and there certainly is
2002 Mar 12
1
Change axes labels in Lattice
Hello I'm making a levelplot with frequencies in a 2*2 table with ordered factors. I get the plot I want, but axes draw the levels of the factor (1,2,3,4..) instead of the desired labels. Is there a way to alter this axes labels in lattice graphics? Thanks for the reply Oscar -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- r-help mailing list -- Read
2012 Mar 22
1
Questions on plotting using zoo toolbox: (1) dual axes (2)legend
Hi, I have three time series and I would like to plot them on the same graph such that two of them share left y-axis and the third uses right y-axis. rm(list=ls()) library(zoo) x1 <- read.csv(file="120322DBCdata.csv", header=TRUE) x1date<-as.yearqtr(1979)+seq(0,nrow(x1)-1)/4 x1zoo<-zoo(x1, x1date, frequency=4) x1zoodata<-cbind(x1zoo$D4GDP, x1zoo$D4NE,
2008 Dec 09
1
controlling axes in plot.cuminc (cmprsk library)
Dear R-help list members, I am trying to create my own axes when plotting a cumulative incidence curve using the plot.cuminc function in the CMPRSK library. The default x-axis places tick marks and labels at 0, 20, 40, 60, and 80 (my data has an upper limit of 96), whereas I want them at my own specified locations. Here is my example code: library(cmprsk) attach(MYDATA) MYCUMINC <-
2009 Jun 15
3
Aligning axis values when plotting more than one graph on same axes
Dear R Users, I am trying to plot a barchart with a line graph superimposed (using par(new=TRUE)). There are 12 bars and 12 corresponding points for the line graph. This is fine, except that I'm encountering two problems: 1) The position of the points (of the line graph) are not centred on the middle (horizontally) of each corresponding bar. In fact, whilst the first point is located on the
2008 Aug 08
1
Axes in filled.contour plots
I am attempting to create a contour plot using R with this code: > contour <- as.matrix(read.csv("contour.csv", row.names=1, header=TRUE)) > library(gplots) > filled.contour(contour, main="Flume 1 Flow Velocities") Now this produces the image/plot that I am looking for perfectly. However, the both axes only go from 0 to 1 instead on of using the row and column
2011 Dec 13
1
plotting 2 Y-axes, aligning the 0 value
Hi, Being a novice to R, I would like to create a graph in R with 2 axes. One of the 2 only has positive values, the other one also has negative values. The part I'm struggling with is how to align the 2. Rather than starting to plot the data from the x axis, I would like to start plotting the positive values on the right axis only as of the 0 value on the left axis. Using a simple example
2004 Nov 19
0
Legend
I have recently converted from S-Plus (Dec Alpha) to R (Mandrake 10.0). The differences are subtle but in some cases not easily converted. My Splus Command plotting deck was over 1200 lines and R has simplified this down to 900 lines so far. I do a lot of mapping with polygons and I am trying to figure out how to increase the default size of the fill boxes in the legend call. Splus had a
2010 Sep 23
1
lattice centre a diverging colour scale
Dear list, I'm using lattice::levelplot to plot a coloured image of 3D data. The range of the z values goes from negative to positive, but is not exactly centred around 0. I would however like to map a diverging colour scale with white falling exactly at 0, and both extremes being symmetrical in the legend to better contrast the opposite change in colour saturation. The following dummy
2008 Nov 20
0
align two lattice plots using grid
Dear list, I'm trying to get two lattice plots aligned on a page. They should share a common x axis, hence the need for perfect alignment, but the data is taken from unrelated, separate sources (it is therefore inappropriate to combine them and use facetting to get an automatic layout: the legend and y axis need to be different). I can get the panels to be of the same size, but