# How do I plot a matrix in Plots instead of gadfly

**URL:** <https://discourse.julialang.org/t/how-do-i-plot-a-matrix-in-plots-instead-of-gadfly/29801>\
**Category:** New to Julia\
**Created:** [October 12, 2019, 12:14am UTC](https://discourse.julialang.org/t/how-do-i-plot-a-matrix-in-plots-instead-of-gadfly/29801 "2019-10-12T00:14:33Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![Mattriks](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/mattriks/32/351_2.png) [@Mattriks](https://discourse.julialang.org/u/Mattriks)\
**Post date:** [October 12, 2019, 3:06am UTC](https://discourse.julialang.org/t/how-do-i-plot-a-matrix-in-plots-instead-of-gadfly/29801/2 "2019-10-12T03:06:42Z")

</div>

Another way to do this in Gadfly:

```julia
p = plot(z=(x,y)->Mandelbrot(x+y*im), 
    xmin=[-2.5], xmax=[1.0], ymin=[-1.75], ymax=[1.75],
    Stat.contour(levels=[10:30;], samples=200), Geom.path,
    Theme(panel_fill="midnightblue")
)

```

![Mandelbrot](https://global.discourse-cdn.com/julialang/original/3X/3/6/36dd79d86894fbd7bc9c4a26efef2a5a8a3cbba0.png)

1. `Gadfly.spy` is aimed at the quick plotting of numerical matrices e.g. where would expect to see the diagonal here?:

```julia
using LinearAlgebra
eye = Matrix(I,10,10)
Gadfly.spy(eye)

```

---

_[View the full topic](https://discourse.julialang.org/t/how-do-i-plot-a-matrix-in-plots-instead-of-gadfly/29801)._
