similar to: Plotting more than one series on the same graph

Displaying 20 results from an estimated 10000 matches similar to: "Plotting more than one series on the same graph"

2011 Jul 07
0
Seasonal correlations
I am an R newbie, and I am facing what is for me a challenging problem. I am trying to write functions to solve the following problems. It seems as though R offers so many options I am not sure how to approach the problem. I have a data frame with dates in the first column and returns in the remaining columns. I would like to give a user a variety of options. I designate Series1 as the
2012 Feb 28
2
ts.plot and x axes customization
Dear List, I would be pleased if someone can help me with the following issue: I'm about to plot two time series in one plot via ts.plot which looks like: ts.plot(series1, series2, main=main, xlab=xlab, ylab=ylab, col=c("green", "red", "blue"), lwd=2) The problem is, that R automatically sets the x axes labels in 5-year-intervalls. Every
2006 Oct 15
2
overlapping intervals
Hello everybody, I have two series of intervals, and I'd like to output the shared regions. For example: series1<-cbind(Start=c(10,21,40,300),End=c(20,26,70,350)) series2<-cbind(Start=c(25,60,210,500),End=c(40,100,400,1000)) > series1 Start End [1,] 10 20 [2,] 21 26 [3,] 40 70 [4,] 300 350 > series2 Start End [1,] 25 40 [2,] 60 100 [3,]
2010 Jul 28
2
Axes=F and plotting dual y axes
Howdy. Been running into a bit of trouble with plotting. Seems that axes=F is not "working". Whenever I plot (either a dataframe or xts/zoo series) and I set axes=F along with xlab/ylab="" I still get the default axes printed in my chart. Consider this: #Create some sample data, both 50 units of blah series2 = c(1:50) series1 = rep(25:74) testdf1 = as.data.frame(series1)
2008 May 03
2
Stacked bar plot anomaly When column contains a negative and a positive value
Hello users, I've noticed a problem when creating a stacked column plot when a column contains a negative and a positive value. e.g. series1<-c(-1,-2, 3, 4, 5) series2<-c( 5, -4,-3,-2, 1) data<-rbind(series1,series2) barplot(as.matrix(data), beside=FALSE) In these cases (i.e. first, third and fifth columns) the plotting is not handled correctly. Compare this output with that
2010 Jan 27
1
How to sort data.frame
Dear R heleprs   Suppose I have following data   Scenarios combination_names     series1    series2 Sc1 MAT2 GAU1 7.26554 8.409778 Sc2 MAT2 GAU2 7.438128 8.130275 Sc3 MAT3 GAU1 8.058422 8.06457 Sc4 MAT1 GAU2 8.179855 8.022071 Sc5 MAT3 GAU2 8.184033 8.191831 Sc6 MAT3 GAU2 7.50312 8.232425 Sc7 MAT1 GAU2 7.603291 8.200993 Sc8 MAT1 GAU1 8.221755 8.380097 Sc9 MAT3 GAU2 7.904908
2006 Jun 20
1
weird application of apply again
uugh : i promise that this will be my last question of the day. i hate to constantly bother this group but it takes me time to get familar with all of these functions, tricks and and manipulations. i appreciate everyone's patience. i used too splus a lot but i've gotten rusty. i have a matrix of say 200 rows and 600 columns. i have a function "getprofit" that takes two series
2004 Apr 29
1
accessing information in lists
I've created a dataframe containing multiple ACF lists through the command rev.acf<-apply(rev.matrix, 2, acf, na.action=na.contiguous, lag.max=12, plot=FALSE) where rev.matrix is an n by t matrix containing n time series in columns. I'd now like to pull out only the ACF information and store it in a seperate n by 12 matrix. So far the only way I can work out to access this is
2006 Mar 17
1
How to change the label in plot.ts ?
Hi you guys: I have been wondering if there is any way to change the labeling in plot.ts( ), for example , if I plot two sequences, i always got y labels as "series1", "series2", I tried to use ylab=c((expression(mu_1)),(expression(mu_2))), but it doesn't work. thanks in advance for any help best.
2010 Oct 29
2
Plotting 2 Lines on the Same Chart
How do I plot two time series plots on the same chart? Thanks, Jason [[alternative HTML version deleted]]
2009 Jan 10
0
RMySQL CREATE TABLE error
Hi all- I am stumped. The code in A. returns errors at lines 14 and 15 and fails to load series1 and series2. However, in B., if temp1 and temp2 are called again (which returns a "Table exists" error; see lines 14-17 in B.) series1 and series2 load correctly. Any ideas? Also-I am open to any suggestions to improve the code as I am a horrific programmer. Thanks A. 1 >
2010 Jun 18
1
ow to apply a panel function to each of several data series plotted on the same graph in lattice
Hi is it possible to fit a trend line (or some other panel function) through each of multiple data series plotted on the same graph? Specifically, while one can do something like xyplot(a+b+c~x) which plots three series, a,b & c, but can one automatically fit lines through each of them? I suppose one could generate three more variables afit, bfit, and cfit with a model & predict and
2023 Jun 28
1
Plotting factors in graph panel
Hi Anupam, Haven't heard from you in a long time. Perhaps you want something like this: at_df<-read.table(text= "Income MF MF_None MF_Equity MF_Debt MF_Hybrid Bank_None Bank_Current Bank_Savings Bank_NA $10 1 3.05 29.76 31.18 36.0 46.54 24.75 25.4 3.307 $25 2 2.29 28.79 32.64 36.27 54.01 24.4 18.7 2.891 $40 3 2.24 29.51 34.31 33.94 59.1 25.0 29 13.4 $75 4 1.71 28.90 35.65 33.74
2008 Jul 10
4
Interpolation of data
Hello, I have the data whcih are not balanced (several missing observations), and one possibility is t use interpolation method to get the information missing in this series from other series. Does anybody know how I can program interpolation of series1 (which ahs missing observations) and series 2-6, for example. Thanks a lot in advance, Silke
2023 Jun 29
2
Plotting factors in graph panel
Okay. Here is a modification that does four single line plots. at_df<-read.table(text= "Income MF MF_None MF_Equity MF_Debt MF_Hybrid Bank_None Bank_Current Bank_Savings Bank_NA $10 1 3.05 29.76 31.18 36.0 46.54 24.75 25.4 3.307 $25 2 2.29 28.79 32.64 36.27 54.01 24.4 18.7 2.891 $40 3 2.24 29.51 34.31 33.94 59.1 25.0 29 13.4 $75 4 1.71 28.90 35.65 33.74 62.17 24.61 11.48 1.746
2010 Mar 17
1
Cropped graph using lattice
I'm fitting data from a mixture experiment, and I'd like to present the results in a ternary graph with contours. I found this code by Walmes Zeviani http://n4.nabble.com/Triangular-filled-contour-plot-td1557386.html which is just what I want--except I would like the axis titles and labels to be proportionately larger than the ternary graph itself, for legibility in publication. When I
2023 Jun 29
1
Plotting factors in graph panel
Reposting the data did not help. We do not like to guess, and doing so takes a great deal of time that is likely wasted. Rows are observations. Columns are variables. In Excel, the first row will be variable names and all subsequent rows will be observations. Income is the first variable. It has seven states: $10, $25, $40, $75, >$75, "No", "Answer" MF is the second
2023 Jun 29
3
Plotting factors in graph panel
Thanks, Pikal and Jim. Yes, it has been a long time Jim. I hope you have been well. Pikal, thanks. Your solution may be close to what I want. I did not know that I was posting in HTML. I just copied the data from Excel and posted in the email in Gmail. The data is still in Excel, because I have not yet figured out what is a good way to organize it in R. I am posting it again below as text. These
2004 Mar 24
0
High/low level: Plot 2 time series with different axis (left and ri ght)
Sun, 14 Mar 2004, Jan Verbesselt wrote: > Dear R specialists, > > I have two time series in a data.frame and want to plot them in the same > plot(), with the left axis scaled to time series 1 (-700,0) and the > right axis scaled to time series 2 (-0.2, 0.4). > > plot(timeserie1) > lines(timeserie2, col=c(2)) => this one should be scaled differently > with a new
2012 Mar 15
1
Bar graph with 2 Y axis
Dear R users,   I need to draw a barplot with 2 Y axis. I have 3 days each of wich having 2 groups (and error bar for each of them). The height of the 3rd day is too tall compared to others. That's why I have to use a second Y axis for that. I am using  "barplot2" function of "gplots" library (to be able to add error bars as well). Data and  codes currently I am using is