Removing a part of a graph

Hi
I have a histogram which shows activity (y-axis) and different species (x-axis) over a time period from July to August. However, there is a gap where I don't have any data. Is it possible to remove this gap, whilst still keeping both periods in the same plot?

Hi @MarieFr , could you try put a reproducible example of data?

see this:

--

# An easy way is paste the result of:

dput(head(yourdataframe, 30))

One way around that might be to set the dates as a factor type and then filter out values other than 0. But first you must arrange the dates so that they are in order on the x-axis.

One approach could be to add a column with the values early and late to indicate the two date regions where you have data, and then use the facet_wrap()function to place the graphs side by side.

This topic was automatically closed 21 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.