How to plot continuous lines using ggplot

Hi i have used a below codes to generate plot.

p2 = ggplot(data= s2_df1, aes(x= time)) +
  geom_line(aes(y=cp), size = 1) + 
  geom_point(aes( y = obs_conc), size = 1) 
p2

i have got the below plot

s2_dis

i want the the ilnes to be connected between each gaps, and look like one continuous line.

can someone help me to do this.

Thanks

Thanks for providing code. Could you kindly take further steps to make it easier for other forum users to help you? Share some representative data that will enable your code to run and show the problematic behaviour.

How do I share data for a reprex?

You might use tools such as the library datapasta, or the base function dput() to share a portion of data in code form, i.e. that can be copied from forum and pasted to R session.

Reprex Guide

try this: aes(x= time, group=1))

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

If you have a query related to it or one of the replies, start a new topic and refer back with a link.