# Gadfly is the best plotting library I've ever used

**URL:** <https://discourse.julialang.org/t/gadfly-is-the-best-plotting-library-ive-ever-used/57887>\
**Category:** Visualization\
**Tags:** gadfly\
**Created:** [March 24, 2021, 6:30pm UTC](https://discourse.julialang.org/t/gadfly-is-the-best-plotting-library-ive-ever-used/57887 "2021-03-24T18:30:43Z")\
**Posts on this page:** 16\
**Page:** 1

<div class="post-metadata">

**Author:** ![tbenst](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/tbenst/32/3029_2.png) [@tbenst](https://discourse.julialang.org/u/tbenst)\
**Post date:** [March 24, 2021, 6:30pm UTC](https://discourse.julialang.org/t/gadfly-is-the-best-plotting-library-ive-ever-used/57887/1 "2021-03-24T18:30:43Z")

</div>

I’ve used ggplot2, matplotlib, bokeh, seaborn, holoviews, VegaLite, plotly, Plots.jl, among many others, and Gadfly is the most productive & principled plotting library I’ve used yet. If you haven’t already given it a go, I highly recommend it. It’s a true joy to work with, and takes the best of ggplot2’s grammar of graphics, matplotlib’s vector-based plotting, and Haskell’s diagrams, all combined in a next gen interface.

Could not recommend more emphatically. Sorry if this is fluff, but I figure no one minds having work acknowledged & praised 🙂

---

<div class="post-metadata">

**Author:** ![nandoconde](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/nandoconde/32/19497_2.png) [@nandoconde](https://discourse.julialang.org/u/nandoconde)\
**Post date:** [March 25, 2021, 12:31pm UTC](https://discourse.julialang.org/t/gadfly-is-the-best-plotting-library-ive-ever-used/57887/2 "2021-03-25T12:31:41Z")

</div>

Hi!

I am trying Julia visualization packages. Does it have support for surface plotting?

I cannot find anything in the docs.

---

<div class="post-metadata">

**Author:** ![sdanisch](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/sdanisch/32/1406_2.png) [@sdanisch](https://discourse.julialang.org/u/sdanisch)\
**Post date:** [March 25, 2021, 12:34pm UTC](https://discourse.julialang.org/t/gadfly-is-the-best-plotting-library-ive-ever-used/57887/3 "2021-03-25T12:34:30Z")

</div>

Yeah Gadfly is a work of beauty… But it’s missing lots of features like surface plots 😉

---

<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:** [March 25, 2021, 12:54pm UTC](https://discourse.julialang.org/t/gadfly-is-the-best-plotting-library-ive-ever-used/57887/4 "2021-03-25T12:54:58Z")

</div>

there is no 3D at all in gadfly, but it can plot surfaces in 2D with contours or bins:

[http://gadflyjl.org/dev/gallery/geometries/#[Geom.contour](@ref)](http://gadflyjl.org/dev/gallery/geometries/#%5BGeom.contour%5D(@ref))

[http://gadflyjl.org/dev/gallery/geometries/#[Geom.density2d](@ref)](http://gadflyjl.org/dev/gallery/geometries/#%5BGeom.density2d%5D(@ref))

[http://gadflyjl.org/dev/gallery/geometries/#[Geom.hexbin](@ref)](http://gadflyjl.org/dev/gallery/geometries/#%5BGeom.hexbin%5D(@ref))

---

<div class="post-metadata">

**Author:** ![rikh](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/rikh/32/204104_2.png) [@rikh](https://discourse.julialang.org/u/rikh)\
**Post date:** [March 25, 2021, 1:53pm UTC](https://discourse.julialang.org/t/gadfly-is-the-best-plotting-library-ive-ever-used/57887/5 "2021-03-25T13:53:08Z")

</div>

@bjarthur probably meant to link to

- [http://gadflyjl.org/dev/gallery/geometries/#[Geom.contour](@ref)](http://gadflyjl.org/dev/gallery/geometries/#%5BGeom.contour%5D(@ref))
- [http://gadflyjl.org/dev/gallery/geometries/#[Geom.density2d](@ref)](http://gadflyjl.org/dev/gallery/geometries/#%5BGeom.density2d%5D(@ref))
- [http://gadflyjl.org/dev/gallery/geometries/#[Geom.hexbin](@ref)](http://gadflyjl.org/dev/gallery/geometries/#%5BGeom.hexbin%5D(@ref))

Which seemed to be broken up by Discourse. Respectively, the plots for these links look as follows:

## Contour

 ![image](https://global.discourse-cdn.com/julialang/original/3X/3/e/3eaceb506d25501be7b03c93e7551e008a29b790.png)

## Density2d

 ![image](https://global.discourse-cdn.com/julialang/original/3X/a/f/af317d3718a423cefb1ed8d69225ed08ba224abf.png)

## Hexbin

 ![image](https://global.discourse-cdn.com/julialang/original/3X/4/4/4466fea8f8608b74407e19b0a165173bdc063d61.png)

---

<div class="post-metadata">

**Author:** ![RoyiAvital](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/royiavital/32/571_2.png) [@RoyiAvital](https://discourse.julialang.org/u/RoyiAvital)\
**Post date:** [March 25, 2021, 3:29pm UTC](https://discourse.julialang.org/t/gadfly-is-the-best-plotting-library-ive-ever-used/57887/6 "2021-03-25T15:29:45Z")

</div>

Does it solve the data exploration issue of other packages?  
What I mean is I couldn’t find any visualization package to imitate MATLAB’s `figure()` data tips.

Namely being able to go through the data values (Only data values not coordinates as in `c` shortcut in Gadfly) (Especially on images).

I think `Plotly` gets close but are there others?

---

<div class="post-metadata">

**Author:** ![nandoconde](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/nandoconde/32/19497_2.png) [@nandoconde](https://discourse.julialang.org/u/nandoconde)\
**Post date:** [March 25, 2021, 3:38pm UTC](https://discourse.julialang.org/t/gadfly-is-the-best-plotting-library-ive-ever-used/57887/7 "2021-03-25T15:38:51Z")

</div>

In my experience, Plotly is good for data exploration with the usual line plots, but forget about it when plotting surfaces, and goodbye to interactivity if you want to build some kind of GUI.

`Makie` is the way to go for all these things, and it is very, very fast. You can have data exploration if you code it manually, see for example: [[Plots.jl] Can't show data on hover (surface plot) - #2 by sudete](https://discourse.julialang.org/t/plots-jl-cant-show-data-on-hover-surface-plot/56397/2)

I love `Makie`, but it is true that it needs to keep improving to be as polished as `Gadfly` for some things. However, this is good! There is still room for improvement.

---

<div class="post-metadata">

**Author:** ![affans](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/affans/32/11911_2.png) [@affans](https://discourse.julialang.org/u/affans)\
**Post date:** [March 25, 2021, 4:10pm UTC](https://discourse.julialang.org/t/gadfly-is-the-best-plotting-library-ive-ever-used/57887/8 "2021-03-25T16:10:52Z")

</div>

I was a big user of `ggplot2` becoming somewhat of an expert during my doctorate years. After moving to Julia, I wasn’t a big fan of Julia’s `Plots.jl`. I eventually settled on `Gnuplot.jl`, which I guess isn’t really a Julia library but is highly customizable. I also realized I like the non-grammer-of-graphics way of plotting.

Is Gadfly as customizable as Gnuplot and how much is it influenced by GoG ?

---

<div class="post-metadata">

**Author:** ![tbenst](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/tbenst/32/3029_2.png) [@tbenst](https://discourse.julialang.org/u/tbenst)\
**Post date:** [March 25, 2021, 4:48pm UTC](https://discourse.julialang.org/t/gadfly-is-the-best-plotting-library-ive-ever-used/57887/9 "2021-03-25T16:48:15Z")

</div>

Yes, Gadfly is GoG-based: [Tutorial · Gadfly.jl](https://gadflyjl.org/stable/tutorial/). Although unlike other GoG libraries, it also supports plotting from dataframes or arrays. Additionally, Gadfly is based on an [elegant declarative graphics engine](https://giovineitalia.github.io/Compose.jl/latest/), so unlike ggplot2 you have low-level access to graphic primitives, all wrapped in beautiful S expressions.

---

<div class="post-metadata">

**Author:** ![RoyiAvital](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/royiavital/32/571_2.png) [@RoyiAvital](https://discourse.julialang.org/u/RoyiAvital)\
**Post date:** [March 27, 2021, 10:41am UTC](https://discourse.julialang.org/t/gadfly-is-the-best-plotting-library-ive-ever-used/57887/10 "2021-03-27T10:41:52Z")

</div>

I anyone trying to create a figure element with experience like MATLAB’s `figure()` in `Makie`?

This is the only feature that make want something like `MatPlot` (Like `PyPlot`) to have MATLAB’s figure experience.

---

<div class="post-metadata">

**Author:** ![Soldalma](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/soldalma/32/29388_2.png) [@Soldalma](https://discourse.julialang.org/u/Soldalma)\
**Post date:** [December 9, 2021, 6:38pm UTC](https://discourse.julialang.org/t/gadfly-is-the-best-plotting-library-ive-ever-used/57887/11 "2021-12-09T18:38:50Z")

</div>

I am watching the excellent Klopper Lectures on YouTube and it has a section on Gadfly. I may be mistaken, but I vaguely remember reading that Gadfly is not being maintained. Is Gadfly worth learning at this point?

---

<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 9, 2021, 7:04pm UTC](https://discourse.julialang.org/t/gadfly-is-the-best-plotting-library-ive-ever-used/57887/12 "2021-12-09T19:04:02Z")

</div>

best way to check whether any package is maintained is to look at the number of commits over time. [gadfly](https://github.com/GiovineItalia/Gadfly.jl/graphs/contributors) has seen a bit of a dip due to covid, but there are 3-4 of us who regularly contribute. please give it a try and let us know what you think.

---

<div class="post-metadata">

**Author:** ![amrods](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/amrods/32/2543_2.png) [@amrods](https://discourse.julialang.org/u/amrods)\
**Post date:** [December 9, 2021, 9:28pm UTC](https://discourse.julialang.org/t/gadfly-is-the-best-plotting-library-ive-ever-used/57887/13 "2021-12-09T21:28:54Z")

</div>

I began using Plots, but never really liked it. I am now trying out VegaLite, but I’m curious, how do Gadfly and Makie compare?

---

<div class="post-metadata">

**Author:** ![StatisticalMouse](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/statisticalmouse/32/43370_2.png) [@StatisticalMouse](https://discourse.julialang.org/u/StatisticalMouse)\
**Post date:** [December 9, 2021, 10:39pm UTC](https://discourse.julialang.org/t/gadfly-is-the-best-plotting-library-ive-ever-used/57887/14 "2021-12-09T22:39:50Z")

</div>

Makie vs Gadly

 ![image](https://global.discourse-cdn.com/julialang/original/3X/e/2/e2448aafd824458b95bee69be5b643573dedc0e2.jpeg)

---

<div class="post-metadata">

**Author:** ![tbenst](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/tbenst/32/3029_2.png) [@tbenst](https://discourse.julialang.org/u/tbenst)\
**Post date:** [December 10, 2021, 4:47am UTC](https://discourse.julialang.org/t/gadfly-is-the-best-plotting-library-ive-ever-used/57887/15 "2021-12-10T04:47:44Z")

</div>

Algebra of Graphics (built on Makie) is quite similar to Gadfly and VegaLite. Perhaps the most principled of the bunch, but the youngest by far

---

<div class="post-metadata">

**Author:** ![olivierverdier](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/olivierverdier/32/50887_2.png) [@olivierverdier](https://discourse.julialang.org/u/olivierverdier)\
**Post date:** [September 18, 2023, 1:56pm UTC](https://discourse.julialang.org/t/gadfly-is-the-best-plotting-library-ive-ever-used/57887/16 "2023-09-18T13:56:32Z")

</div>

I’d like to temper the expectation of anyone reading this thread: as of now (Sept 2023), I would say that Gadfly is very far behind Holoviews in terms of maturity and ease of use. It is also possibly behind Makie? (This is _not_ meant as a criticism of Gadfly, as I’m aware it’s a lot of work to develop such a package; I just want to bring a more balanced view of the julia plotting package landscape.)
