# Create eventplot using PyPlot.jl through Plots.jl

**URL:** <https://discourse.julialang.org/t/create-eventplot-using-pyplot-jl-through-plots-jl/43802>\
**Category:** General Usage\
**Tags:** plotting, pyplot\
**Created:** [July 28, 2020, 7:36am UTC](https://discourse.julialang.org/t/create-eventplot-using-pyplot-jl-through-plots-jl/43802 "2020-07-28T07:36:18Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![smonsays](https://avatars.discourse-cdn.com/v4/letter/s/e47774/32.png) [@smonsays](https://discourse.julialang.org/u/smonsays)\
**Post date:** [July 28, 2020, 7:36am UTC](https://discourse.julialang.org/t/create-eventplot-using-pyplot-jl-through-plots-jl/43802/1 "2020-07-28T07:36:18Z")

</div>

I would like to create what matplotlib calls an [eventplot](https://matplotlib.org/3.3.0/api/_as_gen/matplotlib.pyplot.eventplot.html). As far as I understand, this is only viable through the PyPlot backend for Plots. I tried the following:

```julia
using Random
using Plots
pyplot()

events = rand((0,1), 100)
eventplot(events) # UndefVarError
PyPlot.eventplot(events)

```

Just calling evenplot does not work (why?). For the second method, I am then unsure on how to display/access the plot.

Help would be much appreciated, thanks!
