You need to apply the same transformation to the x argument of panel.lines as
you are setting up for the panel.xyplot.
--
David
Sent from my iPhone
On Apr 10, 2013, at 8:10 PM, jpm miao wrote:
> Hi David,
>
>Thanks. How can I make the graph in log scale?
>
>Thanks
>
> Miao
>
Hi David,
Thanks. How can I make the graph in log scale?
Thanks
Miao
2013/4/11 David Winsemius
>
> On Apr 10, 2013, at 6:11 PM, jpm miao wrote:
>
> Thanks for your comments, David
>
> avg_cost_2012 and asset_2012 are numeric vectors of length 39
>
> while x2 and y1 are longer vectors w
On Apr 10, 2013, at 6:11 PM, jpm miao wrote:
Thanks for your comments, David
avg_cost_2012 and asset_2012 are numeric vectors of length 39
while x2 and y1 are longer vectors whose range is about the same as
(avg_cost_2012, asset_2012)
I also present the data by dput below. Is it clear? Th
Thanks for your comments, David
avg_cost_2012 and asset_2012 are numeric vectors of length 39
while x2 and y1 are longer vectors whose range is about the same as
(avg_cost_2012, asset_2012)
I also present the data by dput below. Is it clear? Thanks,
Miao
asset_2012 avg_cost_2012
1 3973730.0
On Apr 10, 2013, at 12:44 AM, jpm miao wrote:
Hi David,
Many thanks. I try to follow your example and code as follows:
xyplot( avg_cost_2012 ~ asset_2012,
panel=function(x,y) {
panel.xyplot(x,y, type="p")
panel.lines(x2, y1,
col="red")},scales=list(x=list(l
Hi David,
Many thanks. I try to follow your example and code as follows:
xyplot( avg_cost_2012 ~ asset_2012,
panel=function(x,y) {
panel.xyplot(x,y, type="p")
panel.lines(x2, y1, col="red")},scales=list(x=list(log=10)))
However, I do see the points "p" of "avg_c
On Apr 9, 2013, at 8:21 PM, jpm miao wrote:
Thank you very much.
Could it be done in Lattice package?
Your example was not presented in a form that lent itself to easy
editing. Please learn to use dput to present data structures:
xyplot( 4:6 ~ 1:3,
panel=function(x,y) {
Thank you very much.
Could it be done in Lattice package?
Thanks,
Miao
2013/4/10 Janesh Devkota
> Hi,
>
> This should be fairly easy by using base R graphics.
>
> Lets suppose your first data is represented by (x1,y1) and second data is
> represented by (x2,y2)
>
> You can use the following
Hi,
This should be fairly easy by using base R graphics.
Lets suppose your first data is represented by (x1,y1) and second data is
represented by (x2,y2)
You can use the following command.
plot(x1,y1,type="l")
points(x2,y2)
Hope it helps.
On Tue, Apr 9, 2013 at 8:24 PM, jpm miao wrote:
> Hi
Hi,
How can I plot two curves with distinct x and y vectors? I would like to
join one of them by regular lines and plot the other just by points (no
lines). Can it be done in regular R graphic tools, say "plot" function?
Can it be done in Lattice package, say "xyplot" function?
Thanks,
Mi
10 matches
Mail list logo