# \#gadfly

**URL:** https://discourse.julialang.org/tag/gadfly/23.md

[Latest](https://discourse.julialang.org/latest.md) · [Categories](https://discourse.julialang.org/categories.md) · [Tags](https://discourse.julialang.org/tags.md)

---

## [Error bar color in Gadfly](https://discourse.julialang.org/t/error-bar-color-in-gadfly/108561)

<div class="topic-metadata">

**Author:** [@mattwigway](https://discourse.julialang.org/u/mattwigway)\
**Replies:** 0\
**Last updated:** [January 9, 2024, 1:32pm UTC](https://discourse.julialang.org/t/error-bar-color-in-gadfly/108561 "2024-01-09T13:32:18Z")

</div>

I’m trying to make a dodged bar plot with error bars in Gadfly. The problem is that the error bars are the same color as the bars, so you can’t see them. I’d like to just make the error bars black. plot( base\_race\_c…

---

## [Plotting points and boxplots on the same graph in Gadfly](https://discourse.julialang.org/t/plotting-points-and-boxplots-on-the-same-graph-in-gadfly/108413)

<div class="topic-metadata">

**Author:** [@bottaw](https://discourse.julialang.org/u/bottaw)\
**Replies:** 0\
**Last updated:** [January 5, 2024, 10:48pm UTC](https://discourse.julialang.org/t/plotting-points-and-boxplots-on-the-same-graph-in-gadfly/108413 "2024-01-05T22:48:23Z")

</div>

I am trying to make a gadfly graph that includes a series of data points on it with a minimalist boxplot of those points right next to it for statistical comparison. Something like this graph here: I have come pretty…

---

## [Gadfly min/max ranges](https://discourse.julialang.org/t/gadfly-min-max-ranges/106540)

<div class="topic-metadata">

**Author:** [@monty](https://discourse.julialang.org/u/monty)\
**Replies:** 0\
**Last updated:** [November 21, 2023, 4:59pm UTC](https://discourse.julialang.org/t/gadfly-min-max-ranges/106540 "2023-11-21T16:59:17Z")

</div>

The new version of Gadfly seems to be overriding the min/max values set in color\_continuous(). The code below plot(x=rand(12), y=rand(12), color=rand(12), Scale.color\_continuous(minvalue=-1, maxvalue=100)) produces a…

---

## [Gadfly is the best plotting library I've ever used](https://discourse.julialang.org/t/gadfly-is-the-best-plotting-library-ive-ever-used/57887)

<div class="topic-metadata">

**Author:** [@tbenst](https://discourse.julialang.org/u/tbenst)\
**Replies:** 15\
**Last updated:** [September 18, 2023, 1:56pm UTC](https://discourse.julialang.org/t/gadfly-is-the-best-plotting-library-ive-ever-used/57887 "2023-09-18T13:56:32Z")

</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…

---

## [Gadfly scatter plot crashing](https://discourse.julialang.org/t/gadfly-scatter-plot-crashing/102066)

<div class="topic-metadata">

**Author:** [@Axze-rgb](https://discourse.julialang.org/u/Axze-rgb)\
**Replies:** 13\
**Last updated:** [July 28, 2023, 6:46am UTC](https://discourse.julialang.org/t/gadfly-scatter-plot-crashing/102066 "2023-07-28T06:46:27Z")

</div>

Hello, I have a data frame with 2 columns, each has 2 millions points. When I try to plot it crashes Jupyter. I am surprised because R and Python can handle it. Here is my command df2=CSV.read(“/home/alessandro/Data/M…

---

## [Is there a way to make the parts of a plot with less data more visible?](https://discourse.julialang.org/t/is-there-a-way-to-make-the-parts-of-a-plot-with-less-data-more-visible/102014)

<div class="topic-metadata">

**Author:** [@Axze-rgb](https://discourse.julialang.org/u/Axze-rgb)\
**Replies:** 2\
**Last updated:** [July 24, 2023, 1:23pm UTC](https://discourse.julialang.org/t/is-there-a-way-to-make-the-parts-of-a-plot-with-less-data-more-visible/102014 "2023-07-24T13:23:44Z")

</div>

Hello, I am plotting a kernel density, and the right-end of the plot is hard to see, especially when shared on the web with reduced resolution. I am using this command q=Gadfly.plot(U, x=U.x, y=U.density, Geom.point, T…

---

## [The way Gadfly chooses ticks leads to ugly plots very often?](https://discourse.julialang.org/t/the-way-gadfly-chooses-ticks-leads-to-ugly-plots-very-often/100328)

<div class="topic-metadata">

**Author:** [@nsajko](https://discourse.julialang.org/u/nsajko)\
**Replies:** 1\
**Last updated:** [June 14, 2023, 2:13pm UTC](https://discourse.julialang.org/t/the-way-gadfly-chooses-ticks-leads-to-ugly-plots-very-often/100328 "2023-06-14T14:13:10Z")

</div>

There’s an experiment for evaluating the claim in the title here. See the readme, and the SVG plots, viewable directly there (in the browser, on Gitlab). My conclusion was that a very large percentage of these random Ga…

---

## [Legend for functions in a separate (stacked) plot](https://discourse.julialang.org/t/legend-for-functions-in-a-separate-stacked-plot/99796)

<div class="topic-metadata">

**Author:** [@nsajko](https://discourse.julialang.org/u/nsajko)\
**Replies:** 3\
**Last updated:** [June 3, 2023, 7:20pm UTC](https://discourse.julialang.org/t/legend-for-functions-in-a-separate-stacked-plot/99796 "2023-06-03T19:20:41Z")

</div>

TLDR: In Gadfly, what’s the best way to put a legend for a plot into a separate (stacked) plot instead? My problem Current solution I have a module like this for a specific plotting use case: module Plotting using Gad…

---

## [Please, how do I remove the key from a colored bar chart? Deadline immenient, help greatly appreciated](https://discourse.julialang.org/t/please-how-do-i-remove-the-key-from-a-colored-bar-chart-deadline-immenient-help-greatly-appreciated/99248)

<div class="topic-metadata">

**Author:** [@johnabs](https://discourse.julialang.org/u/johnabs)\
**Replies:** 2\
**Last updated:** [May 22, 2023, 10:08pm UTC](https://discourse.julialang.org/t/please-how-do-i-remove-the-key-from-a-colored-bar-chart-deadline-immenient-help-greatly-appreciated/99248 "2023-05-22T22:08:07Z")

</div>

I currently have some separate data frames that aren’t particularly amenable to being combined; but I need to plot them on the same plot but with a single legend/color key. I have done so with the following code, but whe…

---

## [GADFLY Font Change Not Saving](https://discourse.julialang.org/t/gadfly-font-change-not-saving/94044)

<div class="topic-metadata">

**Author:** [@ChrisVL1](https://discourse.julialang.org/u/ChrisVL1)\
**Replies:** 5\
**Last updated:** [February 6, 2023, 2:25am UTC](https://discourse.julialang.org/t/gadfly-font-change-not-saving/94044 "2023-02-06T02:25:42Z")

</div>

When changing the label font and saving as a PDF, the saved pdf does not display the changed font style. Here’s an example: xs = convert(Vector{Float64}, tsteps) layer2 = layer(x=xs1, y=Euler\_Maruyama1,Geom.line,Them…

---

## [Changing orientation of plots in gadfly](https://discourse.julialang.org/t/changing-orientation-of-plots-in-gadfly/93506)

<div class="topic-metadata">

**Author:** [@ChrisVL1](https://discourse.julialang.org/u/ChrisVL1)\
**Replies:** 17\
**Last updated:** [January 26, 2023, 12:12am UTC](https://discourse.julialang.org/t/changing-orientation-of-plots-in-gadfly/93506 "2023-01-26T00:12:55Z")

</div>

Sorry to reopen this issue, but I am trying to recreate this same plotting style in Gadfly as this issue Plotting histogram on the y-axis at the end of a time series. I have these two plots and want to plot side by side …

---

## [Plotting histograms with GADFLY](https://discourse.julialang.org/t/plotting-histograms-with-gadfly/93467)

<div class="topic-metadata">

**Author:** [@ChrisVL1](https://discourse.julialang.org/u/ChrisVL1)\
**Replies:** 3\
**Last updated:** [January 24, 2023, 11:49pm UTC](https://discourse.julialang.org/t/plotting-histograms-with-gadfly/93467 "2023-01-24T23:49:27Z")

</div>

The “density = true” function is not working on my histogram, how do I fix this? prob1 = result3.u u2 = repeat(reshape(S₀, :, 1), 1, 200) y = predict\_neuralsde(prob1, u2)\[1,:,:\]' y1 = y\[end,:\] m = S₀.\*exp.(r.\*1) y\_sort …

---

## [Real time plotting with Gadfly (Vehicle Trajectory Plotting)](https://discourse.julialang.org/t/real-time-plotting-with-gadfly-vehicle-trajectory-plotting/72333)

<div class="topic-metadata">

**Author:** [@benibilme](https://discourse.julialang.org/u/benibilme)\
**Replies:** 6\
**Last updated:** [November 18, 2022, 9:36pm UTC](https://discourse.julialang.org/t/real-time-plotting-with-gadfly-vehicle-trajectory-plotting/72333 "2022-11-18T21:36:11Z")

</div>

Hello, I would like to plot vehicle trajectory on a cartesian coordinate system in near-real time from the data that is coming from a datastream. Is it possible to do this in Gadfly. My requirement is to push latest o…

---

## [How to make this plot in Julia?](https://discourse.julialang.org/t/how-to-make-this-plot-in-julia/75065)

<div class="topic-metadata">

**Author:** [@tp2750](https://discourse.julialang.org/u/tp2750)\
**Replies:** 29\
**Last updated:** [October 17, 2022, 8:15pm UTC](https://discourse.julialang.org/t/how-to-make-this-plot-in-julia/75065 "2022-10-17T20:15:54Z")

</div>

How do I make something similar to the following plot in Julia? using RCall, DataFrames, Random Random.seed!(123) d = DataFrame(name = repeat(\["A","B","C","D","E","F"\], inner=4), time=repeat(\[0,1,3,6\], outer=6), …

---

## [Plots saved to file loose colour](https://discourse.julialang.org/t/plots-saved-to-file-loose-colour/88612)

<div class="topic-metadata">

**Author:** [@evan-wehi](https://discourse.julialang.org/u/evan-wehi)\
**Replies:** 6\
**Last updated:** [October 16, 2022, 5:51pm UTC](https://discourse.julialang.org/t/plots-saved-to-file-loose-colour/88612 "2022-10-16T17:51:19Z")

</div>

I’m saving Gadfly plots as PNG but the colour is stripped from them, making them useless. The code looks like: using DataFrames, Gadfly, Cairo layers = Plot\[\] for protein in proteins l = plot(f4p, x=protein, color=:do…

---

## [Question about the width argument for Gadfly violin plots](https://discourse.julialang.org/t/question-about-the-width-argument-for-gadfly-violin-plots/87339)

<div class="topic-metadata">

**Author:** [@neuro\_enthusiast](https://discourse.julialang.org/u/neuro_enthusiast)\
**Replies:** 5\
**Last updated:** [October 2, 2022, 3:07pm UTC](https://discourse.julialang.org/t/question-about-the-width-argument-for-gadfly-violin-plots/87339 "2022-10-02T15:07:04Z")

</div>

Hi all, I am trying to adjust the scaling of violin plots from Gadfly. I am trying to play around with the “width” argument but I always get the following message Warning: The following aesthetics are mapped, but not u…

---

## [Displaying multiple plots at the same time](https://discourse.julialang.org/t/displaying-multiple-plots-at-the-same-time/87054)

<div class="topic-metadata">

**Author:** [@neuro\_enthusiast](https://discourse.julialang.org/u/neuro_enthusiast)\
**Replies:** 4\
**Last updated:** [September 11, 2022, 9:38am UTC](https://discourse.julialang.org/t/displaying-multiple-plots-at-the-same-time/87054 "2022-09-11T09:38:24Z")

</div>

Hi all, I was trying to plot multiple Gadfly plots and display them in two separate figures. However, only the second plot was displayed. function draw\_stuff() Gadfly.plot(x=\[1,1,2,2\],\[3,4,5,6\],Geom.violin) Gadfly.p…

---

## [What's the kernel used in Geom.density for kernel density estimate in Gadfly?](https://discourse.julialang.org/t/whats-the-kernel-used-in-geom-density-for-kernel-density-estimate-in-gadfly/83275)

<div class="topic-metadata">

**Author:** [@guixien](https://discourse.julialang.org/u/guixien)\
**Replies:** 1\
**Last updated:** [June 24, 2022, 1:15pm UTC](https://discourse.julialang.org/t/whats-the-kernel-used-in-geom-density-for-kernel-density-estimate-in-gadfly/83275 "2022-06-24T13:15:44Z")

</div>

I am not seeing this anywhere in the documentation. Is it simply the Gaussian kernel?

---

## [Plot different length data together in Gadfly](https://discourse.julialang.org/t/plot-different-length-data-together-in-gadfly/77036)

<div class="topic-metadata">

**Author:** [@Nathan\_Boyer](https://discourse.julialang.org/u/Nathan_Boyer)\
**Replies:** 8\
**Last updated:** [June 22, 2022, 12:33pm UTC](https://discourse.julialang.org/t/plot-different-length-data-together-in-gadfly/77036 "2022-06-22T12:33:00Z")

</div>

I am struggling to plot two different (x,y) lines together with a single plot command and the default color palette, since apparently I can’t give the layers label = "Data Label" like in Plots.jl. What is the best way to…

---

## [Gadfly boxplot is getting plotted like a vertical straight line (missing the box part)](https://discourse.julialang.org/t/gadfly-boxplot-is-getting-plotted-like-a-vertical-straight-line-missing-the-box-part/80946)

<div class="topic-metadata">

**Author:** [@rkmalaiya](https://discourse.julialang.org/u/rkmalaiya)\
**Replies:** 4\
**Last updated:** [June 20, 2022, 6:26pm UTC](https://discourse.julialang.org/t/gadfly-boxplot-is-getting-plotted-like-a-vertical-straight-line-missing-the-box-part/80946 "2022-06-20T18:26:24Z")

</div>

Hello, I am trying to make a boxplot using Gadfly but all I see are straight vertical lines. Also, this seems to be a very tricky issue. It only happens for a specific combination of data points, and I am not able to fi…

---

## [Annotate Points in Plot](https://discourse.julialang.org/t/annotate-points-in-plot/82764)

<div class="topic-metadata">

**Author:** [@gjh](https://discourse.julialang.org/u/gjh)\
**Replies:** 2\
**Last updated:** [June 14, 2022, 5:56pm UTC](https://discourse.julialang.org/t/annotate-points-in-plot/82764 "2022-06-14T17:56:45Z")

</div>

Is there a way to annotate each point with its id number? I know it seems odd, but that is what we are hoping to display. Thank you using DataFrames, Gadfly df = DataFrame((id = 1:20), value\_x=rand(20)\*100, value\_y = r…

---

## [Add Dollar Signs to Axis](https://discourse.julialang.org/t/add-dollar-signs-to-axis/82524)

<div class="topic-metadata">

**Author:** [@gjh](https://discourse.julialang.org/u/gjh)\
**Replies:** 1\
**Last updated:** [June 9, 2022, 8:14pm UTC](https://discourse.julialang.org/t/add-dollar-signs-to-axis/82524 "2022-06-09T20:14:59Z")

</div>

I want to add dollar signs to the x and y-axis (e.g., $10K). I’m sure I am missing something simple. Thank you for any help!!! using Gadfly, Printf plot(x=rand(10)\*10\_000, y=rand(10)\*10\_000, Scale.x\_continuous(labels…

---

## ["stack order" in Gadfly histogram](https://discourse.julialang.org/t/stack-order-in-gadfly-histogram/82065)

<div class="topic-metadata">

**Author:** [@Brinkhuis](https://discourse.julialang.org/u/Brinkhuis)\
**Replies:** 0\
**Last updated:** [June 1, 2022, 5:03pm UTC](https://discourse.julialang.org/t/stack-order-in-gadfly-histogram/82065 "2022-06-01T17:03:23Z")

</div>

When plotting a “stacked histogram”, I would like the “stack order” to be the same as the legend order - Fair (first / bottom) and Ideal (last / top) - so that the colors are in order from light to dark. Like in this exa…

---

## [Gadfly: how to add bar spacing to stacked plot without shifting off center?](https://discourse.julialang.org/t/gadfly-how-to-add-bar-spacing-to-stacked-plot-without-shifting-off-center/62148)

<div class="topic-metadata">

**Author:** [@alrichar112](https://discourse.julialang.org/u/alrichar112)\
**Replies:** 1\
**Last updated:** [June 1, 2022, 7:26am UTC](https://discourse.julialang.org/t/gadfly-how-to-add-bar-spacing-to-stacked-plot-without-shifting-off-center/62148 "2022-06-01T07:26:20Z")

</div>

I’m having trouble adding bar spacing to a stacked plot, as it is shifting the bars off center. dfsample = CSV.read("dfsample.csv", DataFrame) p = plot(dfsample, x=:Percent, y=:LessonName, color=:PassType, …

---

## [Annotated heatmaps in Gadfly do not fully show the annotations in the first and last column](https://discourse.julialang.org/t/annotated-heatmaps-in-gadfly-do-not-fully-show-the-annotations-in-the-first-and-last-column/81217)

<div class="topic-metadata">

**Author:** [@Brinkhuis](https://discourse.julialang.org/u/Brinkhuis)\
**Replies:** 1\
**Last updated:** [May 18, 2022, 6:18am UTC](https://discourse.julialang.org/t/annotated-heatmaps-in-gadfly-do-not-fully-show-the-annotations-in-the-first-and-last-column/81217 "2022-05-18T06:18:59Z")

</div>

Coming from Python I tried to reproduce this Seaborn heatmap using Gadfly. The (only) issue I have is that the first and last columns appear smaller than the other columns. As a result the annotations are not fully reada…

---

## [Specify colors in a Gadfly boxplot](https://discourse.julialang.org/t/specify-colors-in-a-gadfly-boxplot/81110)

<div class="topic-metadata">

**Author:** [@Brinkhuis](https://discourse.julialang.org/u/Brinkhuis)\
**Replies:** 1\
**Last updated:** [May 17, 2022, 7:47pm UTC](https://discourse.julialang.org/t/specify-colors-in-a-gadfly-boxplot/81110 "2022-05-17T19:47:24Z")

</div>

I am trying to reproduce this Seaborn plot using Gadfly. The code I have so far is: using CSV, DataFrames, Gadfly download("https://raw.githubusercontent.com/mwaskom/seaborn-data/master/tips.csv", "tips.csv") tips = D…

---

## [How to add point size to a Gadfly scatter plot based on a variable](https://discourse.julialang.org/t/how-to-add-point-size-to-a-gadfly-scatter-plot-based-on-a-variable/81111)

<div class="topic-metadata">

**Author:** [@Brinkhuis](https://discourse.julialang.org/u/Brinkhuis)\
**Replies:** 2\
**Last updated:** [May 15, 2022, 8:13pm UTC](https://discourse.julialang.org/t/how-to-add-point-size-to-a-gadfly-scatter-plot-based-on-a-variable/81111 "2022-05-15T20:13:11Z")

</div>

I am trying to reproduce this Seaborn plot using Gadfly. The code I have so far is: using CSV, DataFrames, Gadfly download("https://raw.githubusercontent.com/mwaskom/seaborn-data/master/mpg.csv", "mpg.csv"); mpg = Dat…

---

## [Gadfly - subplot\_grid is not readjusting the x axis width for free\_x\_axis = true, if xlabels are different in subplots](https://discourse.julialang.org/t/gadfly-subplot-grid-is-not-readjusting-the-x-axis-width-for-free-x-axis-true-if-xlabels-are-different-in-subplots/80950)

<div class="topic-metadata">

**Author:** [@rkmalaiya](https://discourse.julialang.org/u/rkmalaiya)\
**Replies:** 0\
**Last updated:** [May 12, 2022, 11:03am UTC](https://discourse.julialang.org/t/gadfly-subplot-grid-is-not-readjusting-the-x-axis-width-for-free-x-axis-true-if-xlabels-are-different-in-subplots/80950 "2022-05-12T11:03:04Z")

</div>

Hello, This issue is related to using subplot\_grid in Gadfly. The issue is, given the xlabels in the two subplots are different due to my data points, even when I do free\_x\_axis = true, the plot retains the locations of…

---

## [How to make Stat.x\_jitter work with Geom.subplot\_grid](https://discourse.julialang.org/t/how-to-make-stat-x-jitter-work-with-geom-subplot-grid/80152)

<div class="topic-metadata">

**Author:** [@rkmalaiya](https://discourse.julialang.org/u/rkmalaiya)\
**Replies:** 1\
**Last updated:** [May 10, 2022, 11:01am UTC](https://discourse.julialang.org/t/how-to-make-stat-x-jitter-work-with-geom-subplot-grid/80152 "2022-05-10T11:01:32Z")

</div>

Hello Everyone, The plot, using Gadfly.jl, that I am trying to make requires me to jitter the points in a grid plot. But I cannot figure out how? The code example below replicates my situation. Please suggest what may I…

---

## [How to make Geom.errorbar work with Geom.subplot\_grid in Gadfly.jl](https://discourse.julialang.org/t/how-to-make-geom-errorbar-work-with-geom-subplot-grid-in-gadfly-jl/80158)

<div class="topic-metadata">

**Author:** [@rkmalaiya](https://discourse.julialang.org/u/rkmalaiya)\
**Replies:** 2\
**Last updated:** [April 28, 2022, 5:38pm UTC](https://discourse.julialang.org/t/how-to-make-geom-errorbar-work-with-geom-subplot-grid-in-gadfly-jl/80158 "2022-04-28T17:38:08Z")

</div>

Hello Everyone, I am trying to make bar plot with error bars in a plot grid. But I am getting following error. Please advise what I may be doing wrong. Fake Data v = rand(8) df\_plot = DataFrame( model = repeat(\[“M1…

[Next page](https://discourse.julialang.org/tag/gadfly/23.md?match_all_tags=true&page=1&tags%5B%5D=gadfly)
