Quantcast
Channel: Active questions tagged r - Stack Overflow
Viewing all articles
Browse latest Browse all 204742

Plotting a step function with only horizontal lines

$
0
0

I use ggplot2 to plot a step function using geom_step(). What I need now is to get rid of the vertical lines. This should be a quite common problem in math at least...

The docs do not mention such possibility .

Is there a hidden argument somewhere, or do I need to convert the data somehow so I can print individual lines for each datapoint?

TL;DR:

have ggplot(data,aes(x,y))+geom_step()

want ggplot(data,aes(x,y))+geom_step(lines=horizontal)


Viewing all articles
Browse latest Browse all 204742

Trending Articles