[R] How to plot multiple density plot and scatter plot together

David L Carlson dcarlson at tamu.edu
Mon Aug 25 21:55:38 CEST 2014


Assuming the y-axis is different for the scatter line segment plot, you probably want to use twoord.plot() in package plotrix to construct overlapping plots using different ordinate (y-axis) scales. For examples see

http://rgm.ogalab.net/RGM/R_image_list?package=plotrix&rd_name=twoord.plot&data_source=R_CC&init=true

-------------------------------------
David L Carlson
Department of Anthropology
Texas A&M University
College Station, TX 77840-4352

-----Original Message-----
From: r-help-bounces at r-project.org [mailto:r-help-bounces at r-project.org] On Behalf Of ???????? kunjaai
Sent: Monday, August 25, 2014 12:39 PM
To: r-help at r-project.org
Subject: [R] How to plot multiple density plot and scatter plot together

Dear all,
 I want to plot kernal density of two set of data (theses both data set
have same shape) and I want to insert  scatter line segment plot (
http://stackoverflow.com/questions/24931006/r-simple-scatter-plot-with-vertical-lines)
on this same plot.

I can make two density plot together(I have attached that plot), but
together with these density plot, I cannot include scatter line-segment
plot on this density plot.

Thank you all in advance
-- 
DILEEPKUMAR. R
J R F, IIT DELHI


More information about the R-help mailing list