# \#algebraofgraphics

**URL:** https://discourse.julialang.org/tag/algebraofgraphics/624.md

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

---

## [Using pre-sorted data and renaming the factor label at the same time](https://discourse.julialang.org/t/using-pre-sorted-data-and-renaming-the-factor-label-at-the-same-time/139460)

<div class="topic-metadata">

**Author:** [@mahmah](https://discourse.julialang.org/u/mahmah)\
**Replies:** 1\
**Last updated:** [September 14, 2026, 1:51pm UTC](https://discourse.julialang.org/t/using-pre-sorted-data-and-renaming-the-factor-label-at-the-same-time/139460 "2026-09-14T13:51:34Z")

</div>

I’d like to do what the title says, i.e. this: spec = data(df) \* mapping(:countries =\> presorted, :some\_value, color = :group) \* visual(BarPlot, direction = :x) fg = draw(spec) while renaming the factor label t…

---

## [AlgebraOfGraphics plots with error bars and different line styles](https://discourse.julialang.org/t/algebraofgraphics-plots-with-error-bars-and-different-line-styles/139325)

<div class="topic-metadata">

**Author:** [@mahmah](https://discourse.julialang.org/u/mahmah)\
**Replies:** 2\
**Last updated:** [September 10, 2026, 12:26pm UTC](https://discourse.julialang.org/t/algebraofgraphics-plots-with-error-bars-and-different-line-styles/139325 "2026-09-10T12:26:23Z")

</div>

I’m enjoying AlgebraOfGraphics a lot, thank you so much for this package. I have a problem though: I want to use visual(Errorbars) + visual(Lines) in a figure that also specifies LineStyle. I understand that LineStyle sh…

---

## [Legend items with italic parts in AlgebraOfGraphics](https://discourse.julialang.org/t/legend-items-with-italic-parts-in-algebraofgraphics/137341)

<div class="topic-metadata">

**Author:** [@stelmo](https://discourse.julialang.org/u/stelmo)\
**Replies:** 4\
**Last updated:** [May 30, 2026, 8:35am UTC](https://discourse.julialang.org/t/legend-items-with-italic-parts-in-algebraofgraphics/137341 "2026-05-30T08:35:04Z")

</div>

Is there a way to display legend items in AoG that are made of rich text objects? For example, in biology it is usual for species names to be written in italics. It seems the best way to do this with Makie is to use Rich…

---

## [Adding N to each box](https://discourse.julialang.org/t/adding-n-to-each-box/136688)

<div class="topic-metadata">

**Author:** [@mahmah](https://discourse.julialang.org/u/mahmah)\
**Replies:** 8\
**Last updated:** [April 13, 2026, 1:21pm UTC](https://discourse.julialang.org/t/adding-n-to-each-box/136688 "2026-04-13T13:21:54Z")

</div>

I’m trying to see the sample size in each boxplot using AoG. Looking for a robust solution that allows to easily see the number of elements in each box regardless of whether we use faceting, colors, dodge, e.g. Is this a…

---

## [Adding significance to boxplots and violin plots](https://discourse.julialang.org/t/adding-significance-to-boxplots-and-violin-plots/135398)

<div class="topic-metadata">

**Author:** [@mahmah](https://discourse.julialang.org/u/mahmah)\
**Replies:** 1\
**Last updated:** [February 2, 2026, 9:53am UTC](https://discourse.julialang.org/t/adding-significance-to-boxplots-and-violin-plots/135398 "2026-02-02T09:53:24Z")

</div>

I’m having the same question as here, but for Algebra of Graphics. How can I add significance stars to boxplots? Thanks!

---

## [AlgebraOfGraphics documentation frustrations](https://discourse.julialang.org/t/algebraofgraphics-documentation-frustrations/133903)

<div class="topic-metadata">

**Author:** [@Eben60](https://discourse.julialang.org/u/Eben60)\
**Replies:** 46\
**Last updated:** [December 10, 2025, 12:32pm UTC](https://discourse.julialang.org/t/algebraofgraphics-documentation-frustrations/133903 "2025-12-10T12:32:43Z")

</div>

After undertaking one more attempt to wrap my head around AlgebraOfGraphics I started to suspect the problem is not only me being stupid, lazy, and unable to abstract logical thinking. Ok, please help me to make some si…

---

## [2 Y Axes in Algebra of Graphics](https://discourse.julialang.org/t/2-y-axes-in-algebra-of-graphics/68968)

<div class="topic-metadata">

**Author:** [@junder873](https://discourse.julialang.org/u/junder873)\
**Replies:** 4\
**Last updated:** [December 6, 2025, 11:47am UTC](https://discourse.julialang.org/t/2-y-axes-in-algebra-of-graphics/68968 "2025-12-06T11:47:41Z")

</div>

I have been trying to figure out how to make two separate y-axes for a plot in Algebra of Graphics. This seems possible in Makie, julia - Double y-axis on left and right side of plot in Makie.jl - Stack Overflow (though …

---

## [AlgebraOfGraphics and transparency](https://discourse.julialang.org/t/algebraofgraphics-and-transparency/134032)

<div class="topic-metadata">

**Author:** [@mahmah](https://discourse.julialang.org/u/mahmah)\
**Replies:** 2\
**Last updated:** [November 21, 2025, 9:08pm UTC](https://discourse.julialang.org/t/algebraofgraphics-and-transparency/134032 "2025-11-21T21:08:50Z")

</div>

Hi! Can I use AlgebraOfGraphics to create a violin plot, overlay a boxplot with some transparency and also to be able to see all the dots? Thanks for your help!

---

## [How to make a series optional in AlgebraOfGraphics.jl](https://discourse.julialang.org/t/how-to-make-a-series-optional-in-algebraofgraphics-jl/131798)

<div class="topic-metadata">

**Author:** [@Abhro](https://discourse.julialang.org/u/Abhro)\
**Replies:** 2\
**Last updated:** [August 24, 2025, 9:23am UTC](https://discourse.julialang.org/t/how-to-make-a-series-optional-in-algebraofgraphics-jl/131798 "2025-08-24T09:23:10Z")

</div>

I have a “wide” DataFrame where one column is a shared vector of x-values, and two different columns are separate vectors of y-values. For example, df = let t = range(0, 9, length = 1000) mass\_lab\_frame = @. cos…

---

## [Change the axis label](https://discourse.julialang.org/t/change-the-axis-label/130811)

<div class="topic-metadata">

**Author:** [@Geegee](https://discourse.julialang.org/u/Geegee)\
**Replies:** 2\
**Last updated:** [July 18, 2025, 9:43am UTC](https://discourse.julialang.org/t/change-the-axis-label/130811 "2025-07-18T09:43:35Z")

</div>

I have code like this and I get a figure as expected dfrm\_amp = DataFrame(px\_x= x, px\_y = y, z=amplitude, param\_id="amplitude") dfrm\_freq = DataFrame(px\_x= x, px\_y = y, z=driving\_freqs, param\_id="rabi\_freq") dfrm\_offset…

---

## [Plotting a heatmap or surface plot](https://discourse.julialang.org/t/plotting-a-heatmap-or-surface-plot/130702)

<div class="topic-metadata">

**Author:** [@Geegee](https://discourse.julialang.org/u/Geegee)\
**Replies:** 2\
**Last updated:** [July 14, 2025, 3:42pm UTC](https://discourse.julialang.org/t/plotting-a-heatmap-or-surface-plot/130702 "2025-07-14T15:42:31Z")

</div>

Upon reading the tutorial in algebraofgraphics package it sounded really promising. I wanted to plot a heatmap of an image that was recorded with a camera which I wasn’t able to do. Is this just not supported or do I …

---

## [How to label multiple histograms in AlgebraOfGraphics](https://discourse.julialang.org/t/how-to-label-multiple-histograms-in-algebraofgraphics/127429)

<div class="topic-metadata">

**Author:** [@Abhro](https://discourse.julialang.org/u/Abhro)\
**Replies:** 5\
**Last updated:** [April 3, 2025, 6:35am UTC](https://discourse.julialang.org/t/how-to-label-multiple-histograms-in-algebraofgraphics/127429 "2025-04-03T06:35:47Z")

</div>

I have a dataset where each column is a list of occurrences. I would like to plot three columns as three histograms within one figure, but I cannot wrap my head around the AlgebraOfGraphics idioms. Within Makie.jl, I wo…

---

## [Issue with AlgebraOfGraphics.jl: MethodError when using data(df)](https://discourse.julialang.org/t/issue-with-algebraofgraphics-jl-methoderror-when-using-data-df/126795)

<div class="topic-metadata">

**Author:** [@Margot\_Geisbauer](https://discourse.julialang.org/u/Margot_Geisbauer)\
**Replies:** 1\
**Last updated:** [March 10, 2025, 11:45pm UTC](https://discourse.julialang.org/t/issue-with-algebraofgraphics-jl-methoderror-when-using-data-df/126795 "2025-03-10T23:45:55Z")

</div>

I’m trying to plot timing data using AlgebraOfGraphics.jl and CairoMakie.jl. My data consists of timestamps (in seconds) and hit types (early, perfect, late). The hit types are mapped to numeric values: "early" → -1.0 "…

---

## [How to make xlabelvisible = false in AoG](https://discourse.julialang.org/t/how-to-make-xlabelvisible-false-in-aog/119317)

<div class="topic-metadata">

**Author:** [@vladdez](https://discourse.julialang.org/u/vladdez)\
**Replies:** 1\
**Last updated:** [September 12, 2024, 1:32pm UTC](https://discourse.julialang.org/t/how-to-make-xlabelvisible-false-in-aog/119317 "2024-09-12T13:32:53Z")

</div>

Imagine I have this figure: df = (; name = \["Anna", "Beatrix", "Claire"\], height\_meters = \[1.55, 1.76, 1.63\]) m = mapping(:name, :height\_meters) spec1 = data(df) \* m \* visual(BarPlot) f = Figure() draw!(f\[1, 1\], spec1)…

---

## [AoG error: "No aesthetic mapping defined ..."](https://discourse.julialang.org/t/aog-error-no-aesthetic-mapping-defined/117398)

<div class="topic-metadata">

**Author:** [@hendri54](https://discourse.julialang.org/u/hendri54)\
**Replies:** 4\
**Last updated:** [July 24, 2024, 11:37am UTC](https://discourse.julialang.org/t/aog-error-no-aesthetic-mapping-defined/117398 "2024-07-24T11:37:35Z")

</div>

I defined a wrapper function around AoG’s visual(BarPlot) with a fair number of options (subplots, sub-figures, etc). This worked fine until I updated to AoG v0.7.2 and CairoMakie v 0.12.5 Now calling the function yield…

---

## [Figure title for a faceted plot in AlgebraOfGraphics](https://discourse.julialang.org/t/figure-title-for-a-faceted-plot-in-algebraofgraphics/63329)

<div class="topic-metadata">

**Author:** [@CameronBieganek](https://discourse.julialang.org/u/CameronBieganek)\
**Replies:** 10\
**Last updated:** [July 23, 2024, 5:05pm UTC](https://discourse.julialang.org/t/figure-title-for-a-faceted-plot-in-algebraofgraphics/63329 "2024-07-23T17:05:26Z")

</div>

I can’t seem to get an overall figure title for a faceted plot in AlgebraOfGraphics: using CairoMakie using AlgebraOfGraphics using DataFrames df = DataFrame( x = randn(100), y = randn(100), g = rand(\["a", …

---

## [\[ANN\] AlgebraOfGraphics v0.7](https://discourse.julialang.org/t/ann-algebraofgraphics-v0-7/117124)

<div class="topic-metadata">

**Author:** [@jules](https://discourse.julialang.org/u/jules)\
**Replies:** 1\
**Last updated:** [July 21, 2024, 5:45am UTC](https://discourse.julialang.org/t/ann-algebraofgraphics-v0-7/117124 "2024-07-21T05:45:26Z")

</div>

Hello everybody, I’m excited to present version 0.7 of AlgebraOfGraphics.jl. This is work that I’ve been doing during the last two or three months, as we at PumasAI like to use the package but it had been in need of som…

---

## [AoG/Makie: Axis sorted in alphabetical order](https://discourse.julialang.org/t/aog-makie-axis-sorted-in-alphabetical-order/113527)

<div class="topic-metadata">

**Author:** [@gruemelmonster](https://discourse.julialang.org/u/gruemelmonster)\
**Replies:** 2\
**Last updated:** [April 26, 2024, 12:39pm UTC](https://discourse.julialang.org/t/aog-makie-axis-sorted-in-alphabetical-order/113527 "2024-04-26T12:39:55Z")

</div>

I am trying to plot some measurement data using AoG. I am also pretty new to this, so I might be missing something obvious. When I try to plot data that has string entries as an X-Axis, the values get sorted by alphabet…

---

## [AoG plotting: column name :x not found in data frame](https://discourse.julialang.org/t/aog-plotting-column-name-x-not-found-in-data-frame/112248)

<div class="topic-metadata">

**Author:** [@shrdlu](https://discourse.julialang.org/u/shrdlu)\
**Replies:** 5\
**Last updated:** [March 30, 2024, 9:14am UTC](https://discourse.julialang.org/t/aog-plotting-column-name-x-not-found-in-data-frame/112248 "2024-03-30T09:14:47Z")

</div>

Hi, I’m trying the AlgebraOfGraphics page demo for heatmap-style visualization (Visual · Algebra of Graphics) using my own local data. I have no issues importing the external .tsv matrix file, but the process throws an…

---

## [How to tweak dodge bar plot's label position of AOG](https://discourse.julialang.org/t/how-to-tweak-dodge-bar-plots-label-position-of-aog/108221)

<div class="topic-metadata">

**Author:** [@math4mad](https://discourse.julialang.org/u/math4mad)\
**Replies:** 0\
**Last updated:** [January 1, 2024, 1:26am UTC](https://discourse.julialang.org/t/how-to-tweak-dodge-bar-plots-label-position-of-aog/108221 "2024-01-01T01:26:33Z")

</div>

I want to clone this chart : Views about AI’s impact on society in the next 20 years, 2021 here is my code using Tidier, DataFrames, CSV, AlgebraOfGraphics, Pipe countrys = \["Japan", "China", "Germany", "France"\] c…

---

## [Failing to plot correlograms in Julia: Makie vs. AoG vs StatsPlots](https://discourse.julialang.org/t/failing-to-plot-correlograms-in-julia-makie-vs-aog-vs-statsplots/107971)

<div class="topic-metadata">

**Author:** [@enzomar](https://discourse.julialang.org/u/enzomar)\
**Replies:** 30\
**Last updated:** [December 30, 2023, 1:00am UTC](https://discourse.julialang.org/t/failing-to-plot-correlograms-in-julia-makie-vs-aog-vs-statsplots/107971 "2023-12-30T01:00:47Z")

</div>

I am trying with any possible package to plot a classic correlation plot (scatterplots for each variable vs each other and density histogram on the diagonal in the middle). Sometime they are cold correlogram or pairplots…

---

## [How to use AlgebraOfGraphics to plot three figures together](https://discourse.julialang.org/t/how-to-use-algebraofgraphics-to-plot-three-figures-together/106920)

<div class="topic-metadata">

**Author:** [@Chao](https://discourse.julialang.org/u/Chao)\
**Replies:** 3\
**Last updated:** [November 30, 2023, 9:58pm UTC](https://discourse.julialang.org/t/how-to-use-algebraofgraphics-to-plot-three-figures-together/106920 "2023-11-30T21:58:26Z")

</div>

Hello, the current plots I have are as follows: These are three different figures. I just paste them together. I want to have them in one figure. This is my code: using AlgebraOfGraphics, CairoMakie gdfc data(gdfc)…

---

## [Different visual types for different y axis variables](https://discourse.julialang.org/t/different-visual-types-for-different-y-axis-variables/105771)

<div class="topic-metadata">

**Author:** [@gsinha](https://discourse.julialang.org/u/gsinha)\
**Replies:** 0\
**Last updated:** [November 3, 2023, 7:41pm UTC](https://discourse.julialang.org/t/different-visual-types-for-different-y-axis-variables/105771 "2023-11-03T19:41:34Z")

</div>

How would I get y to be a scatter and yhat to be a scatterline in the following statement? data(df) \* mapping(:x, \[y, yhat\], color = dims(1) =\> renamer(\["Actual", "Predicted"\])) |\> draw;

---

## [AoG "range step cannot be zero"](https://discourse.julialang.org/t/aog-range-step-cannot-be-zero/87624)

<div class="topic-metadata">

**Author:** [@jar1](https://discourse.julialang.org/u/jar1)\
**Replies:** 14\
**Last updated:** [October 24, 2023, 9:27am UTC](https://discourse.julialang.org/t/aog-range-step-cannot-be-zero/87624 "2023-10-24T09:27:13Z")

</div>

I don’t have an MWE but maybe someone has a guess what this means? ERROR: ArgumentError: range step cannot be zero Stacktrace: \[1\] (::Colon)(start::Float32, step::Float32, stop::Float32) @ Base ./twiceprecision.jl…

---

## [Plotting "hierachically" organized variables](https://discourse.julialang.org/t/plotting-hierachically-organized-variables/104978)

<div class="topic-metadata">

**Author:** [@mreichMPI-BGC](https://discourse.julialang.org/u/mreichMPI-BGC)\
**Replies:** 2\
**Last updated:** [October 15, 2023, 11:44pm UTC](https://discourse.julialang.org/t/plotting-hierachically-organized-variables/104978 "2023-10-15T23:44:38Z")

</div>

Dear community, is there an elegant/easy/concise way of plotting some y variables against an x variable, where y variables should either be divided into facets or colors, i.e. for a dataframe and defined facets: a=…

---

## [How can I rotate the BoxPlot with AoG?](https://discourse.julialang.org/t/how-can-i-rotate-the-boxplot-with-aog/102218)

<div class="topic-metadata">

**Author:** [@AugustoCL](https://discourse.julialang.org/u/AugustoCL)\
**Replies:** 5\
**Last updated:** [August 8, 2023, 4:24am UTC](https://discourse.julialang.org/t/how-can-i-rotate-the-boxplot-with-aog/102218 "2023-08-08T04:24:41Z")

</div>

I’m trying to reproduce the following plot using AoG customizing whatever is needed with CairoMakie properties/parameters. So, as the names are long, I need to rotate them to see better. this plot just used coord\_fli…

---

## [AoG Barplot: How to match color of a single bar to theme?](https://discourse.julialang.org/t/aog-barplot-how-to-match-color-of-a-single-bar-to-theme/101586)

<div class="topic-metadata">

**Author:** [@hendri54](https://discourse.julialang.org/u/hendri54)\
**Replies:** 4\
**Last updated:** [July 14, 2023, 11:25am UTC](https://discourse.julialang.org/t/aog-barplot-how-to-match-color-of-a-single-bar-to-theme/101586 "2023-07-14T11:25:59Z")

</div>

When I generate grouped barplots in AoG, the colors of the bars are determined by the theme. However, barplots with a single group produce grey bars. How can I set the bar colors to match the theme? MWE: using Algebra…

---

## [AoG Attributes and/or Post-Plot Environment Stacking?](https://discourse.julialang.org/t/aog-attributes-and-or-post-plot-environment-stacking/98640)

<div class="topic-metadata">

**Author:** [@Nathan\_Boyer](https://discourse.julialang.org/u/Nathan_Boyer)\
**Replies:** 0\
**Last updated:** [May 10, 2023, 8:20pm UTC](https://discourse.julialang.org/t/aog-attributes-and-or-post-plot-environment-stacking/98640 "2023-05-10T20:20:18Z")

</div>

I have an AlgebraOfGraphics.Layers object drawn in my package environment which has CairoMakie as a dependency. I now find myself needing to zoom in. I assume there is an axis option I can use to set xlimits and ylimits…

---

## [AoG free scale facet](https://discourse.julialang.org/t/aog-free-scale-facet/94858)

<div class="topic-metadata">

**Author:** [@aelmokadem](https://discourse.julialang.org/u/aelmokadem)\
**Replies:** 2\
**Last updated:** [February 19, 2023, 2:06pm UTC](https://discourse.julialang.org/t/aog-free-scale-facet/94858 "2023-02-19T14:06:08Z")

</div>

Hi, I am trying to facet a AoG plot using layout and wanted to set the scales free for the facetted plot similar to ggplot2 scales = "free" option. Any thoughts?! Thanks, Ahmed.

---

## [Plot multiple similar CSVs with AoG](https://discourse.julialang.org/t/plot-multiple-similar-csvs-with-aog/94279)

<div class="topic-metadata">

**Author:** [@Nathan\_Boyer](https://discourse.julialang.org/u/Nathan_Boyer)\
**Replies:** 12\
**Last updated:** [February 9, 2023, 3:23pm UTC](https://discourse.julialang.org/t/plot-multiple-similar-csvs-with-aog/94279 "2023-02-09T15:23:25Z")

</div>

I am loading multiple CSV files and want to plot them on top of each other, but I can’t figure out an easy way to change the line color and style to identify them in a legend. df1 = DataFrame("X Data" =\> 1:3, "Unused Da…

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