similar to: Multiple plots on a common x-axis, different y-axes

Displaying 20 results from an estimated 40000 matches similar to: "Multiple plots on a common x-axis, different y-axes"

2009 Aug 04
5
Stacked plots with common x-axis and different y-axis
Is there a place that shows how to create two plots that are stacked on top of each other where they share a common x-axis scale, but have differnt y-axis scale? Say have the following data: airquality Stack plot(airquality$Day, airquality$Wind) on top of plot(airquality$Day, airquality$Temp). I am interested in stacking the two on top of each other with no seam, or plotting the two lines with
2004 Mar 17
0
Plot 2 time series with different y axes (left and right)
Petr Pikal said: > I am not really a R specialist but for this task I use function: and he pasted his code into the email. I reindented the code, and wrote a fragment to experiment with it. Here it is: --------------------------------------------------------------------------- plot.yy <- function(x, yright, yleft, yleftlim=NULL, yrightlim = NULL,
2011 Jun 15
2
plot with two y axes BUT unaligned x axis
Hi all, I have scoured the archives of this forum but nothing quite seems to fit the bill... I would like to plot a graph displaying two variables (y axes) that share date as the x axis. However, the date values for each variable are not the same - for example, some parasitoids were not released on days that collections from the trap took place, whilst sometimes releases did occur on the same
2001 Jan 30
1
Disappearing x axis in plot.factor (PR#830)
Hi. While there is an x-axis set up for: > plot.factor(factor(1:3)) this axis is not present for > plot.factor(factor(1:3), col="red") which actually should just be the same as the first plot and call barplot(table(.)), shouldn't it? Where did the ticks and labels go? Note that > barplot (table(factor(1:3)), col="red") has the x-axis. Something funky is going
2008 Jul 08
0
Multiple Plots and y Axis Labels
Hi, I'm using the mfrow parameter in par() to plot several timeseries with a common time x axis as a sequence of plots one below the other. I reduced the top and bottom margins to zero to get a very nice looking plot but sometimes the labels on the y axes from one plot overlap with the y axis labels on the plot above or below. Any ideas how I can prevent this without losing the look of the
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
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
2016 Aug 18
1
axis.POSIXct and axis.Date fail for reversed axes
When plotting a reversed time axis with the base graphics system, R fails to label the axes. Example: times <- c(Sys.time() - 100, Sys.time()) plot(times, 1:2, xlim = times) # correctly labels the x-axis plot(times, 1:2, xlim = rev(times)) # fails to label the x-axis axis.POSIXct(1, times) # still fails to add labels dates <- c(Sys.Date() - 10, Sys.Date()) plot(dates, 1:2, xlim = dates)
2005 Nov 28
1
Use of axis() in conjunction with plot(..., axes=F)
Colleagues On occasion, I want to control either tick marks or labels in axes different from the defaults created with "axes=T" in the plot command. If I invoke "axes=F" and axis(n), I can do so. However, the axes produced by axis() differ slightly from those produced within plot. I have "bty" in par set to "l" (i.e., left and bottom axes
2010 Jan 25
1
Same y-axis on multiple plots?
Greetings, I am attempting to use R throug PL/R in PostgreSQL to make several graphs (they show usage over time for radiochannels). However, as some never go above 100 in a 24 hour period, and others go well over 500, they get different y-axis values (which normally would be a good thing). However, as I want to overlay the graphs to add/remove channels in CSS on a webpage, I need a set y-axis.
2007 Oct 13
1
Plotting with 2 y axes
My data is the following: Time Resistance Temperature 5 2000 4 10 2200 8 15 2500 14 20 2900 20 25 3000 29 30 3100 38 35 3500 46 40 3800 47 45 3900 50 50 4000 51 I would like to create a scatter plot with Time on the x axis, Resistance on the y axis and Temperature on a second y axis. I have tried Plot(Time,Resistance,ylim=range(0,4500)
2007 Jun 26
1
ylab at the right hand of a plot with two y axes
When I try to plot two lines ( or scatterplots) with different scales, this is what I have been doing: Suppose: I have y1 and y2 in a very different scale y1 = 1:100 y2 = c(100:1)*10 To plot them on top of each other and denote by different colors: I have to figure out the correct scale '10' and corresponding tick.vector and lables. Then do: plot(1:100, y1) # I can have
2011 Apr 29
4
plot several histograms with same y-axes scaling using hist()
Dear all Problem: hist()-function, scale = ?percent? I want to generate histograms for changing underlying data. In order to make them comparable, I want to fix the y-axis (vertical-axis) to, e.g., 0%, 10%, 20%, 30% as well as to fix the spaces, too. So the y-axis in each histogram should be identical. Currently, I have 100 histograms and the y-axis scales changes in each. Here is my code:
2010 Apr 02
2
plot area: secondary y-axis does not display well
Dear useRs, I'm having a slight problem with plotting on 2 axes. While the following code works alright on screen, the saved output does not turn out as desired i.e. the secondary y-axis does not display fully. Just run the code and look at image output. Suggestions please... thanks, Muhammad --- rm(list=ls()) x <- 1:100 y <- 200:300 par(mar=c(5,5,5,7)+0.1) # inner margin
2011 Nov 06
1
Request for Help: y-axis label overlapped by x-axis in subplots in big plot
Dear All, I would like to seek for help on this issue: 1. I set par(mfrow=c(2,2)), hoping to plot 4 subgraphs in a whole graph 2. Each subgraph has its own x,y axes and each has x-axis label and y-axis label 3. moreover, subgraphs in the left column of the whole graph are all 3D, and have z axes and labels for z axes 4. subgraphs in the right column of the whole graph are all 2D 5. In each
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
2011 Jan 26
2
plot with 2 y axes
Dear R users, apologies for the total beginner's question. I would like to create a barchart for some temperature values with the y axis on the right hand side of the plot. On this plot would like to overlay some time series data (in the form of a line) for some other variable called Index. The y axis for this latter variable should be on the left hand side of the plot. An example of what I
2010 Jul 06
1
multiple time series plot with dual 'y' axes
Hello. I would like to know how to generate dual 'y' axes on a multiple time series plot. I am using ts.plot() to get the multiple time series plot, but I would like a second vertical axis on the right to include another time series on a different scale. Thanks for any help. Cheers. Jorge
2003 Apr 03
4
Two y-axis in plots
Hi, I am trying to plot two data sets on one plot but with using a different y-axis ranges for each - preferably with one shown on each side of the graph. Is there a function that will allow me to do this. Thanks Allan McRae [[alternate HTML version deleted]]
2010 Jun 24
2
Correctly plotting bar and scatter chart on 2-y axis plot with par(new=T)
Hello Nabble users, A question about having two y axes on a chart. I'm trying to show on the left (first) y axis a measure used in an experiment; the x axis shows the experiment number, that has been sorted in a specific manner -- i.e. not Experiments 1,2,3,n, but could be Experiment 6,1,18,n; the right (second) y axis shows an experimental variable. The idea of the chart is to show how