Xianwen Chen
2013-Sep-30 22:17 UTC
[R] [sm.density.compare] scale up y-axis and additional line type
Dear fellows, The two questions are on sm.density.compare(). I compare kernel density estimates of two arrays of data. I'd like to scale up y-axis so that I can show better the differences in y values. English is not my first language so I'll try to explain it. I would like to stretch y-axis a bit longer but not to change the range of y values. How can I do this? Second, I'm using a solid line for one array of date and a dashed line for another array of data. The difference is not easy to see, because the two curves are approximate to some degree. Is it possible to plot one array of data with *, instead of dash? Thanks! Kind regards, Xianwen
Jim Lemon
2013-Oct-01 04:00 UTC
[R] [sm.density.compare] scale up y-axis and additional line type
On 10/01/2013 08:17 AM, Xianwen Chen wrote:> Dear fellows, > > The two questions are on sm.density.compare(). I compare kernel density > estimates of two arrays of data. > > I'd like to scale up y-axis so that I can show better the differences in > y values. English is not my first language so I'll try to explain it. I > would like to stretch y-axis a bit longer but not to change the range of > y values. How can I do this? > > Second, I'm using a solid line for one array of date and a dashed line > for another array of data. The difference is not easy to see, because > the two curves are approximate to some degree. Is it possible to plot > one array of data with *, instead of dash? >Hi Xianwen, You can specify the width and height of the graphics device: dev.new(height=9) OR png("myplot.png",height=600) or some other type of device. This will produce a plot that is noticeably higher than it is wide. For the second question, try: lty=3,lwd=3 Jim