# Visualization

**URL:** https://discourse.julialang.org/c/domain/viz/17.md?page=27

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

**Page:** 28

---

## [Plot Dirichlet distributions](https://discourse.julialang.org/t/plot-dirichlet-distributions/105155)

<div class="topic-metadata">

**Author:** [@math4mad](https://discourse.julialang.org/u/math4mad)\
**Replies:** 1\
**Last updated:** [October 20, 2023, 11:30pm UTC](https://discourse.julialang.org/t/plot-dirichlet-distributions/105155 "2023-10-20T23:30:40Z")

</div>

using Distributions, GLMakie, Random, Pipe Random.seed!(232) # 1. define params array vecs = \[\[0.1,0.1,0.1\],\[0.2,0.2,0.2\],\[1, 1, 1\], \[2, 2, 2\], \[6, 6, 6\], \[10, 10, 10\],\[20,20,20\],\[50,50,50\],\[100,100,100\]\] #2. sampling…

---

## [Makie - how to align text in a Button](https://discourse.julialang.org/t/makie-how-to-align-text-in-a-button/104685)

<div class="topic-metadata">

**Author:** [@ultradian](https://discourse.julialang.org/u/ultradian)\
**Replies:** 4\
**Last updated:** [October 18, 2023, 7:24pm UTC](https://discourse.julialang.org/t/makie-how-to-align-text-in-a-button/104685 "2023-10-18T19:24:26Z")

</div>

How do you align text in a Button? I didn’t see any way to do it in the docs. Only using valign and halign to align the button in its bbox. In a related question, I tried to change the padding, but didn’t notice an effe…

---

## [How to efficiently empty Makie figure / delete widgets?](https://discourse.julialang.org/t/how-to-efficiently-empty-makie-figure-delete-widgets/103612)

<div class="topic-metadata">

**Author:** [@ffevotte](https://discourse.julialang.org/u/ffevotte)\
**Replies:** 22\
**Last updated:** [October 18, 2023, 5:31pm UTC](https://discourse.julialang.org/t/how-to-efficiently-empty-makie-figure-delete-widgets/103612 "2023-10-18T17:31:34Z")

</div>

I’m very new to Makie, so there is probably something I did not understand. I’m trying to build some sort of UI with Makie, in which the number of widgets will change over time. In order to handle this I tried an approa…

---

## [Plots and display](https://discourse.julialang.org/t/plots-and-display/105060)

<div class="topic-metadata">

**Author:** [@harven](https://discourse.julialang.org/u/harven)\
**Replies:** 7\
**Last updated:** [October 18, 2023, 2:29pm UTC](https://discourse.julialang.org/t/plots-and-display/105060 "2023-10-18T14:29:52Z")

</div>

I am doing a cheap animation by displaying a plot every 1/60th of a second using the Plots package. Unfortunately, it is not very fast. It happens that this is the call to the display function that is slow. This can be …

---

## [Help to perform scatter density plot with Plots.jl](https://discourse.julialang.org/t/help-to-perform-scatter-density-plot-with-plots-jl/72790)

<div class="topic-metadata">

**Author:** [@bienpierre](https://discourse.julialang.org/u/bienpierre)\
**Replies:** 9\
**Last updated:** [October 17, 2023, 5:24pm UTC](https://discourse.julialang.org/t/help-to-perform-scatter-density-plot-with-plots-jl/72790 "2023-10-17T17:24:59Z")

</div>

Dear all, I would like to perform a scatter density plot with Plots.jl, such as: scatter density: Two way explored : package : KernelDensity.jl, usable to perform some kind of contour plots; There is also the histo…

---

## [JSServe crashing when recording plot of matrix views](https://discourse.julialang.org/t/jsserve-crashing-when-recording-plot-of-matrix-views/105053)

<div class="topic-metadata">

**Author:** [@sceptri](https://discourse.julialang.org/u/sceptri)\
**Replies:** 0\
**Last updated:** [October 17, 2023, 9:26am UTC](https://discourse.julialang.org/t/jsserve-crashing-when-recording-plot-of-matrix-views/105053 "2023-10-17T09:26:59Z")

</div>

Hello everyone, consider the following MWE code using Observables, JSServe, WGLMakie, Markdown App() do session::Session n = Slider(5:10) xs = 1:10 ys = rand(length(xs)) fig = Figure() axis = Axis(fig\[1,1\]) xs…

---

## [Latex in Luxor](https://discourse.julialang.org/t/latex-in-luxor/78985)

<div class="topic-metadata">

**Author:** [@marcfish](https://discourse.julialang.org/u/marcfish)\
**Replies:** 11\
**Last updated:** [October 16, 2023, 11:48pm UTC](https://discourse.julialang.org/t/latex-in-luxor/78985 "2023-10-16T23:48:45Z")

</div>

i want to text latex in luxor but it seems wrong with fonts ther is the code: using Luxor using MathTeXEngine @svg begin background("khaki") f(t) = Point(4cos(t) + 2cos(5t), 4sin(t) + 2sin(5t)) setline(15) fontsize(3…

---

## [Makie PairPlot](https://discourse.julialang.org/t/makie-pairplot/39298)

<div class="topic-metadata">

**Author:** [@Dustin\_Hess](https://discourse.julialang.org/u/Dustin_Hess)\
**Replies:** 7\
**Last updated:** [October 16, 2023, 1:56pm UTC](https://discourse.julialang.org/t/makie-pairplot/39298 "2023-10-16T13:56:30Z")

</div>

Hi all I am trying to make a pairplot similar to what you get with the Seaborn library but with Makie. I am using MakieLayouts and StatsMakie. I am using the classic Iris data to test it before using it elsewhere. The …

---

## [Proportion plot in CairoMakie](https://discourse.julialang.org/t/proportion-plot-in-cairomakie/104743)

<div class="topic-metadata">

**Author:** [@alicepiller](https://discourse.julialang.org/u/alicepiller)\
**Replies:** 4\
**Last updated:** [October 16, 2023, 1:01pm UTC](https://discourse.julialang.org/t/proportion-plot-in-cairomakie/104743 "2023-10-16T13:01:16Z")

</div>

I am trying to make a proportion plot, where the x-axis is the year (2000 - 2004) and the y-axis is from 0 - 1. Each bar has a height of 1 and should be stacked to show the proportion of the different health score catego…

---

## [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=…

---

## [Makie: how to remove a legend from an axis](https://discourse.julialang.org/t/makie-how-to-remove-a-legend-from-an-axis/65876)

<div class="topic-metadata">

**Author:** [@HenriDeh](https://discourse.julialang.org/u/HenriDeh)\
**Replies:** 7\
**Last updated:** [October 14, 2023, 6:28pm UTC](https://discourse.julialang.org/t/makie-how-to-remove-a-legend-from-an-axis/65876 "2023-10-14T18:28:22Z")

</div>

Hi, I’m making a dashboard and I’m using a lot of mutating functions to make an interactive plot that changes its content based on a menu selection. When I change the plot, I remove the former one from the axis using emp…

---

## [Makie on() do block does not see a variable](https://discourse.julialang.org/t/makie-on-do-block-does-not-see-a-variable/104918)

<div class="topic-metadata">

**Author:** [@oscarvdvelde](https://discourse.julialang.org/u/oscarvdvelde)\
**Replies:** 2\
**Last updated:** [October 13, 2023, 7:58pm UTC](https://discourse.julialang.org/t/makie-on-do-block-does-not-see-a-variable/104918 "2023-10-13T19:58:44Z")

</div>

I am in this situation: on(topbutton\[4\].clicks) do click lma,lmaheader,lmafile,tim,xy,tz = load\_lma\_data(lmafolder,lmafile,1) selection\[\] = lma.qua .&& (0 .\< tim .\<= 600) end Result: Error in callback: Undef…

---

## [Makie line plots using colormaps?](https://discourse.julialang.org/t/makie-line-plots-using-colormaps/104908)

<div class="topic-metadata">

**Author:** [@rkube](https://discourse.julialang.org/u/rkube)\
**Replies:** 3\
**Last updated:** [October 12, 2023, 8:23pm UTC](https://discourse.julialang.org/t/makie-line-plots-using-colormaps/104908 "2023-10-12T20:23:34Z")

</div>

Hi, I would like to produce a line plot where the color of each line is taken from a colormap, like batlow , see Colors · Makie I’ve tried lines(1:20, color=:batlow10\[3\]) and variations thereof but couldn’t get it to…

---

## [Plots.jl colormap transparency](https://discourse.julialang.org/t/plots-jl-colormap-transparency/104876)

<div class="topic-metadata">

**Author:** [@abehersan](https://discourse.julialang.org/u/abehersan)\
**Replies:** 6\
**Last updated:** [October 12, 2023, 3:28pm UTC](https://discourse.julialang.org/t/plots-jl-colormap-transparency/104876 "2023-10-12T15:28:21Z")

</div>

Using the GR backend, I am trying to recreate the following plot style: Note that the lower end of the colormap is transparent. There are some ideas for colormap transparency that however make the whole colorpalette t…

---

## [Extracting vector of contour lines from Makie.contour?](https://discourse.julialang.org/t/extracting-vector-of-contour-lines-from-makie-contour/104866)

<div class="topic-metadata">

**Author:** [@rkube](https://discourse.julialang.org/u/rkube)\
**Replies:** 2\
**Last updated:** [October 11, 2023, 5:37pm UTC](https://discourse.julialang.org/t/extracting-vector-of-contour-lines-from-makie-contour/104866 "2023-10-11T17:37:43Z")

</div>

Hi, I’d like to extract contour lines from a Makie contour plot as a vector, like the black lines in the plot here. Is there any way to do that?

---

## [Makie errorbars in legend look awkward](https://discourse.julialang.org/t/makie-errorbars-in-legend-look-awkward/104832)

<div class="topic-metadata">

**Author:** [@Salmon](https://discourse.julialang.org/u/Salmon)\
**Replies:** 3\
**Last updated:** [October 11, 2023, 2:10pm UTC](https://discourse.julialang.org/t/makie-errorbars-in-legend-look-awkward/104832 "2023-10-11T14:10:50Z")

</div>

Hi, somehow I cannot find the solution to this problem online. I want a simple plot with errorbars which are shown in the legend: fig = Figure() ax = Axis(fig\[1,1\]) errorbars!(ax,1:10,rand(10),0.05\*ones(10),color = :…

---

## [Tube plots?](https://discourse.julialang.org/t/tube-plots/65999)

<div class="topic-metadata">

**Author:** [@mcmwright](https://discourse.julialang.org/u/mcmwright)\
**Replies:** 20\
**Last updated:** [October 11, 2023, 10:38am UTC](https://discourse.julialang.org/t/tube-plots/65999 "2023-10-11T10:38:40Z")

</div>

I use a lot of 3D line plots in my teaching, and I’ve been trying different visualization packages to make them . Is there anything in the Julia graphics ecosystem that could show the line as a ‘tube’ with a lighting mod…

---

## [Makie.jl as a Manim alternative?](https://discourse.julialang.org/t/makie-jl-as-a-manim-alternative/104406)

<div class="topic-metadata">

**Author:** [@savq](https://discourse.julialang.org/u/savq)\
**Replies:** 10\
**Last updated:** [October 9, 2023, 11:03pm UTC](https://discourse.julialang.org/t/makie-jl-as-a-manim-alternative/104406 "2023-10-09T23:03:00Z")

</div>

This semester I have to present a video for my Computer Algebra class, and the topic I chose is related to random walks generated by irrational numbers. Our professor suggested using Manim to animate the videos. I’m unf…

---

## [Matplotlib animation](https://discourse.julialang.org/t/matplotlib-animation/104779)

<div class="topic-metadata">

**Author:** [@Edward\_Montague](https://discourse.julialang.org/u/Edward_Montague)\
**Replies:** 0\
**Last updated:** [October 10, 2023, 1:26am UTC](https://discourse.julialang.org/t/matplotlib-animation/104779 "2023-10-10T01:26:31Z")

</div>

Over at the matplotlib website, at the discourse, there’s an example of an animated surface function with proper perspective. You may have a use for this.

---

## [Custom Markershapes in Plots jl](https://discourse.julialang.org/t/custom-markershapes-in-plots-jl/104542)

<div class="topic-metadata">

**Author:** [@Gattu\_Mytraya](https://discourse.julialang.org/u/Gattu_Mytraya)\
**Replies:** 4\
**Last updated:** [October 4, 2023, 2:39pm UTC](https://discourse.julialang.org/t/custom-markershapes-in-plots-jl/104542 "2023-10-04T14:39:27Z")

</div>

I would like to use custom marker shapes (I hope to import them as SVG files) in scatterplots using Plots jl. How can I do this?

---

## [Fixing plot position during an animation for CairoMakie](https://discourse.julialang.org/t/fixing-plot-position-during-an-animation-for-cairomakie/104709)

<div class="topic-metadata">

**Author:** [@Varun\_V](https://discourse.julialang.org/u/Varun_V)\
**Replies:** 1\
**Last updated:** [October 7, 2023, 9:16pm UTC](https://discourse.julialang.org/t/fixing-plot-position-during-an-animation-for-cairomakie/104709 "2023-10-07T21:16:49Z")

</div>

Hello, I want to animate a series of heatmaps and save it to a video but when I try, the heatmap does not stay in the same place and shakes (its position changes slightly for each frame). Below is code for a minimum wor…

---

## [How to make this custom median for color images faster](https://discourse.julialang.org/t/how-to-make-this-custom-median-for-color-images-faster/104651)

<div class="topic-metadata">

**Author:** [@Rakesh](https://discourse.julialang.org/u/Rakesh)\
**Replies:** 2\
**Last updated:** [October 6, 2023, 3:47pm UTC](https://discourse.julialang.org/t/how-to-make-this-custom-median-for-color-images-faster/104651 "2023-10-06T15:47:00Z")

</div>

I have made custom median filter for color images, but it performs slow and takes high memory compared to OpenCV.medianBlur. Here is code using ImageIO using FileIO using ImageFiltering using ImageCore # using Statistic…

---

## [Hot to maintain equal plot sizes of subplot when using e.g. \`legend=:outertop\`?](https://discourse.julialang.org/t/hot-to-maintain-equal-plot-sizes-of-subplot-when-using-e-g-legend-outertop/104637)

<div class="topic-metadata">

**Author:** [@Torkel](https://discourse.julialang.org/u/Torkel)\
**Replies:** 0\
**Last updated:** [October 5, 2023, 11:48pm UTC](https://discourse.julialang.org/t/hot-to-maintain-equal-plot-sizes-of-subplot-when-using-e-g-legend-outertop/104637 "2023-10-05T23:48:29Z")

</div>

MWE: using Plots p1 = plot(x-\>x^2, label = "my curve") plot(x-\>x^1, label = "A curve") plot!(x-\>x^1, label = "Curve 1") plot!(x-\>x^2, label = "Curve 2") plot!(x-\>x^3, label = "Curve 3") plot!(x-\>x^4, label = "Curve 4") …

---

## [Inline labeling on line plot (using Plots.jl)](https://discourse.julialang.org/t/inline-labeling-on-line-plot-using-plots-jl/104250)

<div class="topic-metadata">

**Author:** [@Brent](https://discourse.julialang.org/u/Brent)\
**Replies:** 2\
**Last updated:** [October 5, 2023, 10:27am UTC](https://discourse.julialang.org/t/inline-labeling-on-line-plot-using-plots-jl/104250 "2023-10-05T10:27:11Z")

</div>

Is there a way to do inline labeling (or direct labeling) of lines in a line plot using the Plots.jl package? I’m looking for something similar to the package matplotlib-label-lines for Python. Some examples from the doc…

---

## [Easy way to plot a circle given as a vector of vectors (pointwise) as line plot?](https://discourse.julialang.org/t/easy-way-to-plot-a-circle-given-as-a-vector-of-vectors-pointwise-as-line-plot/104574)

<div class="topic-metadata">

**Author:** [@homocomputeris](https://discourse.julialang.org/u/homocomputeris)\
**Replies:** 15\
**Last updated:** [October 5, 2023, 9:30am UTC](https://discourse.julialang.org/t/easy-way-to-plot-a-circle-given-as-a-vector-of-vectors-pointwise-as-line-plot/104574 "2023-10-05T09:30:15Z")

</div>

Is there an easier way to plot a shape (in geometric sense, not Plots.jl’s) given as a vector of points (i.e. 2D-vectors)? using Plots # approximately a circle vector\_of\_points = \[\[0.708441362115303, 1.413585198669223\]…

---

## [Plots and click events](https://discourse.julialang.org/t/plots-and-click-events/104253)

<div class="topic-metadata">

**Author:** [@vvbond](https://discourse.julialang.org/u/vvbond)\
**Replies:** 9\
**Last updated:** [October 4, 2023, 5:13pm UTC](https://discourse.julialang.org/t/plots-and-click-events/104253 "2023-10-04T17:13:20Z")

</div>

Hi All, I wonder, if any of the Plots’ backends provides an infrastructure to handle click events. According to this page Click events in Julia, PlotlyJS should support it. However, I’d be keen to use the plotlyjs() bac…

---

## [Makie/CairoMakie custom colorbar ticks (\> and \<)](https://discourse.julialang.org/t/makie-cairomakie-custom-colorbar-ticks-and/104460)

<div class="topic-metadata">

**Author:** [@ewillcox](https://discourse.julialang.org/u/ewillcox)\
**Replies:** 2\
**Last updated:** [October 3, 2023, 7:08pm UTC](https://discourse.julialang.org/t/makie-cairomakie-custom-colorbar-ticks-and/104460 "2023-10-03T19:08:37Z")

</div>

Hello, I’d like to customize my Colorbar() ticks in Makie/CairoMakie I have reduced the colorrange on a graph since I have outliers that I do wish to display but don’t wish to have impact my colormap. Currently the tic…

---

## [Plotting a vector field in a grid structure](https://discourse.julialang.org/t/plotting-a-vector-field-in-a-grid-structure/104492)

<div class="topic-metadata">

**Author:** [@Undercover](https://discourse.julialang.org/u/Undercover)\
**Replies:** 1\
**Last updated:** [October 3, 2023, 2:38pm UTC](https://discourse.julialang.org/t/plotting-a-vector-field-in-a-grid-structure/104492 "2023-10-03T14:38:25Z")

</div>

Hello there, I’m solving the Maxwell’s equation numerically in R^3, and I’m trying to create a plot which draws a vector in the point in 3D space. Essentially, I’m trying to make a plot that looks like the following, min…

---

## [Is it posible to make a 2D slider in Makie?](https://discourse.julialang.org/t/is-it-posible-to-make-a-2d-slider-in-makie/104349)

<div class="topic-metadata">

**Author:** [@Knud\_Sorensen](https://discourse.julialang.org/u/Knud_Sorensen)\
**Replies:** 2\
**Last updated:** [October 2, 2023, 2:50pm UTC](https://discourse.julialang.org/t/is-it-posible-to-make-a-2d-slider-in-makie/104349 "2023-10-02T14:50:02Z")

</div>

Is it possible to make a 2D slider ?? In the following code I would like to have a circle in a rectangle that I can drag around instead of 2 different sliders. How would you do that ? using GLMakie fig = Figure() sl\_…

---

## [CairoMakie invert\_normals = true not working](https://discourse.julialang.org/t/cairomakie-invert-normals-true-not-working/104496)

<div class="topic-metadata">

**Author:** [@p\_f](https://discourse.julialang.org/u/p_f)\
**Replies:** 1\
**Last updated:** [October 2, 2023, 12:50pm UTC](https://discourse.julialang.org/t/cairomakie-invert-normals-true-not-working/104496 "2023-10-02T12:50:46Z")

</div>

When plotting surfaces using CairoMakie they appear dull because invert\_normals = true doesn’t seem to work. MWE: code that plots an open sphere using GLMakie and CairoMakie, with invert\_normals=true/false, and saves a …

[Previous page](https://discourse.julialang.org/c/domain/viz/17.md?page=26)

[Next page](https://discourse.julialang.org/c/domain/viz/17.md?page=28)
