[R] Correctly plotting bar and scatter chart on 2-y axis plot with par(new=T)

dan.weavesham dan.weavesham at googlemail.com
Thu Jun 24 21:47:14 CEST 2010


Hello, 

Thanks for the advice so far -- still struggling with it, I must admit. 

Here is some sample data, which I hope helps:

# y axis #1 -- data for the bar chart
-30353.382 -21693.519   -7049.923  -72968.722  -10267.584 -269432.795
-19847.670 -686283.171 -376231.754 -597800.080 -274637.587 -112663.167
-39550.445 -133916.431

# x axis -- in specific order, so cannot be tampered with !! ;-)
1  7 13  2  8 14  3  9  4 10  5 11  6 12

# y axis #2 -- scatter chart
50  25   5  25   5 100   5 100 100  75  75  50  50  50

Does this help explain what I'm looking to do? If not, is there a way I can
get plot() to not change the order of the x axis data points -- so instead
of plotting 1,2,3,n as per my original post, it plots 1,7,13,n? (I've tried
coercing the data into character format with no luck)

Thanks again in advance.

-- 
View this message in context: http://r.789695.n4.nabble.com/Correctly-plotting-bar-and-scatter-chart-on-2-y-axis-plot-with-par-new-T-tp2266589p2267550.html
Sent from the R help mailing list archive at Nabble.com.



More information about the R-help mailing list