# Plot grids with Plots and Gadfly

**URL:** <https://discourse.julialang.org/t/plot-grids-with-plots-and-gadfly/51222>\
**Category:** New to Julia\
**Tags:** question, plotting, gadfly, plots\
**Created:** [December 3, 2020, 9:05pm UTC](https://discourse.julialang.org/t/plot-grids-with-plots-and-gadfly/51222 "2020-12-03T21:05:46Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![mkarikom](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/mkarikom/32/7096_2.png) [@mkarikom](https://discourse.julialang.org/u/mkarikom)\
**Post date:** [December 3, 2020, 9:05pm UTC](https://discourse.julialang.org/t/plot-grids-with-plots-and-gadfly/51222/1 "2020-12-03T21:05:46Z")

</div>

I need a figure with components from Plots and Gadfly, specifically Plots.heatmap() and Gadfly.plot().

The following does not work:

```julia
using Plots,Gadfly,Compse
p1 = Plots.heatmap(rand(10,10))
p2 = Gadfly.plot(x=[1,2,3], y=[6,7,8])
vstack(p1,p2)

ERROR: MethodError: no method matching vstack(::Plots.Plot{Plots.GRBackend}, ::Plot)
Closest candidates are:
  vstack(::Any, ::Any, ::Any, ::Tuple{Context,Compose.HAlignment}...) at /home/me/.julia/packages/Compose/Opbga/src/stack.jl:81
  vstack(::Union{Context, Plot}...) at /home/me/.julia/packages/Gadfly/USbaq/src/Gadfly.jl:902
Stacktrace:
 [1] top-level scope at /home/me/code/scratch.jl:119

```

---

<div class="post-metadata">

**Author:** ![bjarthur](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/bjarthur/32/9638_2.png) [@bjarthur](https://discourse.julialang.org/u/bjarthur)\
**Post date:** [December 6, 2020, 3:35am UTC](https://discourse.julialang.org/t/plot-grids-with-plots-and-gadfly/51222/2 "2020-12-06T03:35:38Z")

</div>

i don’t think it’s possible to mix Gadfly and Plots. might try using `Gadfly.spy()` instead of `Plots.heatmap()`.
