Plotting with Lines Function

I have process that gives the output with the following values. I would like to plot this on a graph using the lines function however when doing this I cannot seem to create an accurate plot. How can I plot the following using the lines function

[1] 0.00000000 0.00000000 0.00000000 0.00000000 0.02422924 0.02211847 0.02030373 0.01806205 0.01584046 0.04314234 0.04064545 0.04090086 0.03584243 0.03330357 0.04097595 0.03623013 0.03346147 0.03044403 0.02866031 0.02693319 0.02832876

[22] 0.02419024 0.02097880 0.02126051 0.02057323 0.02002243 0.02200681 0.02515222 0.02629810 0.03094984 0.04723567 0.04598012 0.04485712 0.05394273 0.05373836 0.06080055 0.06151201 0.06280606 0.07320772 0.07831162 0.11061757 0.11001137

[43] 0.11005805 0.11595313 0.12176875 0.12839616 0.12741359 0.13085312 0.13361390 0.13479076 0.13348272 0.13043844 0.13008776 0.13035932 0.12998105 0.13140665 0.13117472 0.12952669 0.13143115 0.13291106 0.13272691 0.13297395 0.13299020

[64] 0.13217203 0.13298200 0.13275076 0.13353919

yvals <- c(0.00000000, 0.00000000, 0.00000000, 0.00000000, 0.02422924,
           0.02211847, 0.02030373, 0.01806205, 0.01584046, 0.04314234,
           0.04064545, 0.04090086, 0.03584243, 0.03330357, 0.04097595,
           0.03623013, 0.03346147, 0.03044403, 0.02866031, 0.02693319,
           0.02832876, 0.02419024, 0.02097880, 0.02126051, 0.02057323,
           0.02002243, 0.02200681, 0.02515222, 0.02629810, 0.03094984,
           0.04723567, 0.04598012, 0.04485712, 0.05394273, 0.05373836,
           0.06080055, 0.06151201, 0.06280606, 0.07320772, 0.07831162,
           0.11061757, 0.11001137, 0.11005805, 0.11595313, 0.12176875,
           0.12839616, 0.12741359, 0.13085312, 0.13361390, 0.13479076,
           0.13348272, 0.13043844, 0.13008776, 0.13035932, 0.12998105,
           0.13140665, 0.13117472, 0.12952669, 0.13143115, 0.13291106,
           0.13272691, 0.13297395, 0.13299020, 0.13217203, 0.13298200,
           0.13275076, 0.13353919)


library(tidyverse)
mydata <- enframe(yvals)
ggplot(data=mydata, 
       mapping=aes(x=name,
                   y=value)) +
  geom_path()

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.