# Visualization

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

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

**Page:** 71

---

## [How to plot a multivariate normal distribution?](https://discourse.julialang.org/t/how-to-plot-a-multivariate-normal-distribution/35486)

<div class="topic-metadata">

**Author:** [@mthelm85](https://discourse.julialang.org/u/mthelm85)\
**Replies:** 6\
**Last updated:** [February 23, 2021, 11:37pm UTC](https://discourse.julialang.org/t/how-to-plot-a-multivariate-normal-distribution/35486 "2021-02-23T23:37:34Z")

</div>

Plotting univariate distributions is really simple: using Distributions using StatsPlots norm = fit(Normal, rand(100)) plot(norm) However, how would I plot a multivariate distribution? The above code doesn’t work for …

---

## [Line Segment in Plots](https://discourse.julialang.org/t/line-segment-in-plots/55800)

<div class="topic-metadata">

**Author:** [@brett\_knoss](https://discourse.julialang.org/u/brett_knoss)\
**Replies:** 14\
**Last updated:** [February 22, 2021, 10:44pm UTC](https://discourse.julialang.org/t/line-segment-in-plots/55800 "2021-02-22T22:44:47Z")

</div>

Is there a way to create a line segment in plots? f(x)=2x plot(f);vline!(\[f(3), f(4)\]) How would I get the lines to go from the y origin to f(x) only?

---

## [Fit histograms for multiple series in the same bar-plot](https://discourse.julialang.org/t/fit-histograms-for-multiple-series-in-the-same-bar-plot/55686)

<div class="topic-metadata">

**Author:** [@DrChainsaw](https://discourse.julialang.org/u/DrChainsaw)\
**Replies:** 12\
**Last updated:** [February 22, 2021, 10:06pm UTC](https://discourse.julialang.org/t/fit-histograms-for-multiple-series-in-the-same-bar-plot/55686 "2021-02-22T22:06:52Z")

</div>

I just ran into the age old problem of wanting to plot bar histograms (using StatsPlots.jl) from multiple series of data as a grouped bar plot (i.e bars from different series appearing next to each other in each bin). A…

---

## [Put a heatmap into a mesh face](https://discourse.julialang.org/t/put-a-heatmap-into-a-mesh-face/55746)

<div class="topic-metadata">

**Author:** [@lazarusA](https://discourse.julialang.org/u/lazarusA)\
**Replies:** 3\
**Last updated:** [February 22, 2021, 2:41pm UTC](https://discourse.julialang.org/t/put-a-heatmap-into-a-mesh-face/55746 "2021-02-22T14:41:11Z")

</div>

The mesh function seems to be pretty fast, is there a way to include a heatmap like in the following example. Eventually I would like to have all faces with different colormaps. Any suggestions are welcome. using GLMa…

---

## [Plotting distributions with StatsPlots in a for loop](https://discourse.julialang.org/t/plotting-distributions-with-statsplots-in-a-for-loop/55748)

<div class="topic-metadata">

**Author:** [@Storopoli](https://discourse.julialang.org/u/Storopoli)\
**Replies:** 7\
**Last updated:** [February 22, 2021, 10:25am UTC](https://discourse.julialang.org/t/plotting-distributions-with-statsplots-in-a-for-loop/55748 "2021-02-22T10:25:36Z")

</div>

Hey guys! I need to understand why this does not plot inside a for loop but does plot ok outside: using Distributions, StatsPlots dists = Iterators.product(0:1:2, 0:0.2:1) |\> collect for i in dists plot!(Normal(i…

---

## [Delete/redraw plot in Makie](https://discourse.julialang.org/t/delete-redraw-plot-in-makie/55659)

<div class="topic-metadata">

**Author:** [@darsnack](https://discourse.julialang.org/u/darsnack)\
**Replies:** 1\
**Last updated:** [February 20, 2021, 1:56am UTC](https://discourse.julialang.org/t/delete-redraw-plot-in-makie/55659 "2021-02-20T01:56:25Z")

</div>

I have a neural network and I am plotting its decision boundary using a trick with contourf! (basically make a 2D grid of points then apply the neural network to classify each point; contour line will end up on the decis…

---

## [How to use a Button in GLMakie](https://discourse.julialang.org/t/how-to-use-a-button-in-glmakie/55583)

<div class="topic-metadata">

**Author:** [@ufechner7](https://discourse.julialang.org/u/ufechner7)\
**Replies:** 3\
**Last updated:** [February 19, 2021, 6:11am UTC](https://discourse.julialang.org/t/how-to-use-a-button-in-glmakie/55583 "2021-02-19T06:11:32Z")

</div>

The following code fails: using GLMakie, AbstractPlotting, AbstractPlotting.MakieLayout scene, layout = layoutscene(resolution = (840, 900)) Button(scene, label = "RESET") with the following error: julia\> include("sr…

---

## [Makie - Is there a \`show\_axis=false\` equivalent for the \`Axis\` object?](https://discourse.julialang.org/t/makie-is-there-a-show-axis-false-equivalent-for-the-axis-object/55535)

<div class="topic-metadata">

**Author:** [@jonalm](https://discourse.julialang.org/u/jonalm)\
**Replies:** 1\
**Last updated:** [February 18, 2021, 11:04am UTC](https://discourse.julialang.org/t/makie-is-there-a-show-axis-false-equivalent-for-the-axis-object/55535 "2021-02-18T11:04:39Z")

</div>

Is it possible to mimic the old show\_axis=false behavior for Axis objects? potentially relevant issue: show\_axis parameter is ignored · Issue #88 · jkrumbiegel/MakieLayout.jl · GitHub

---

## [Makie - How to pad data inside an axis?](https://discourse.julialang.org/t/makie-how-to-pad-data-inside-an-axis/55488)

<div class="topic-metadata">

**Author:** [@Kolaru](https://discourse.julialang.org/u/Kolaru)\
**Replies:** 2\
**Last updated:** [February 18, 2021, 12:19am UTC](https://discourse.julialang.org/t/makie-how-to-pad-data-inside-an-axis/55488 "2021-02-18T00:19:23Z")

</div>

I currently have the following and I would like to put a bit more space above the curves (generated with density for the second and third). How can I achieve that? If I could access the current xlims or ylims I could…

---

## [Plot function with multiple arguments](https://discourse.julialang.org/t/plot-function-with-multiple-arguments/55411)

<div class="topic-metadata">

**Author:** [@Evan](https://discourse.julialang.org/u/Evan)\
**Replies:** 3\
**Last updated:** [February 17, 2021, 9:12am UTC](https://discourse.julialang.org/t/plot-function-with-multiple-arguments/55411 "2021-02-17T09:12:13Z")

</div>

I would like to plot a function that takes multiple inputs or arguments. An example for illustrative purpose: using Plots function dgp\_DD\_t(x, treatment=1) y = (2+ treatment)\*x end plot(dgp\_DD\_t,0,50) But what i wa…

---

## [Lag with WGLMakie](https://discourse.julialang.org/t/lag-with-wglmakie/55399)

<div class="topic-metadata">

**Author:** [@yakir12](https://discourse.julialang.org/u/yakir12)\
**Replies:** 9\
**Last updated:** [February 17, 2021, 10:51am UTC](https://discourse.julialang.org/t/lag-with-wglmakie/55399 "2021-02-17T10:51:20Z")

</div>

In the following MWE (requires a connected webcam to work), I experience a substantial lag and a surprisingly low frame-rate: using VideoIO, WGLMakie, JSServe, Observables cam = VideoIO.opencamera() # open the webcam i…

---

## [Can LaTeXStrings display arrays and DataFrames with LaTeX characters?](https://discourse.julialang.org/t/can-latexstrings-display-arrays-and-dataframes-with-latex-characters/55281)

<div class="topic-metadata">

**Author:** [@Michael\_Barmann](https://discourse.julialang.org/u/Michael_Barmann)\
**Replies:** 2\
**Last updated:** [February 15, 2021, 3:11am UTC](https://discourse.julialang.org/t/can-latexstrings-display-arrays-and-dataframes-with-latex-characters/55281 "2021-02-15T03:11:01Z")

</div>

I’ve recently discovered the package LaTeXStrings, and am very impressed with it. I was wondering if this package makes it possible to display LaTeX strings within arrays and DataFrames. For example, suppose I have a Dat…

---

## [Automatic adjustment of ticks when zooming with Plots.jl](https://discourse.julialang.org/t/automatic-adjustment-of-ticks-when-zooming-with-plots-jl/5055)

<div class="topic-metadata">

**Author:** [@mzaffalon](https://discourse.julialang.org/u/mzaffalon)\
**Replies:** 3\
**Last updated:** [February 13, 2021, 4:07pm UTC](https://discourse.julialang.org/t/automatic-adjustment-of-ticks-when-zooming-with-plots-jl/5055 "2021-02-13T16:07:19Z")

</div>

In Plots.jl using pyplot as the backend, when I zoom in the plot using the pan/zoom button, the axes ticks are not automatically adjusted as PyPlot, nor the x,y coordinates at the bottom left of the plot window are displ…

---

## [Record from camera, save to file, and acess last recorded frame](https://discourse.julialang.org/t/record-from-camera-save-to-file-and-acess-last-recorded-frame/55200)

<div class="topic-metadata">

**Author:** [@yakir12](https://discourse.julialang.org/u/yakir12)\
**Replies:** 0\
**Last updated:** [February 13, 2021, 10:33am UTC](https://discourse.julialang.org/t/record-from-camera-save-to-file-and-acess-last-recorded-frame/55200 "2021-02-13T10:33:00Z")

</div>

Caveat: After writing this post I realized that it has very little to do with Julia, but people here are super smart, maybe someone will know the answer… I want to record video from a camera, save it to file, and at the…

---

## [How to plot a heatmap using jet colormap or/and other matplotlib colormaps](https://discourse.julialang.org/t/how-to-plot-a-heatmap-using-jet-colormap-or-and-other-matplotlib-colormaps/54974)

<div class="topic-metadata">

**Author:** [@Valery](https://discourse.julialang.org/u/Valery)\
**Replies:** 15\
**Last updated:** [February 10, 2021, 8:13pm UTC](https://discourse.julialang.org/t/how-to-plot-a-heatmap-using-jet-colormap-or-and-other-matplotlib-colormaps/54974 "2021-02-10T20:13:16Z")

</div>

Hi all, When I enter clibraries(), I get: julia\> clibraries() 5-element Array{Symbol,1}: :Plots :cmocean :misc :colorcet :colorbrewer Misc, is supposed to contain the jet colormap, when I try this simple code …

---

## [Plotting a recursion graph for a function with 2 arguments](https://discourse.julialang.org/t/plotting-a-recursion-graph-for-a-function-with-2-arguments/54951)

<div class="topic-metadata">

**Author:** [@ash](https://discourse.julialang.org/u/ash)\
**Replies:** 4\
**Last updated:** [February 10, 2021, 6:35pm UTC](https://discourse.julialang.org/t/plotting-a-recursion-graph-for-a-function-with-2-arguments/54951 "2021-02-10T18:35:17Z")

</div>

I have a recursive function with 2 indices of the form: function calc\_rs(n,p) println("Calculating for ($n,$p)") if n != 1 calc\_rs(n-1, 1) calc\_rs(n-1, p+1) end end It is called as: calc\_rs…

---

## [Makie: adjusting axis scale / limits in 3D](https://discourse.julialang.org/t/makie-adjusting-axis-scale-limits-in-3d/29231)

<div class="topic-metadata">

**Author:** [@mihai](https://discourse.julialang.org/u/mihai)\
**Replies:** 5\
**Last updated:** [February 7, 2021, 8:10pm UTC](https://discourse.julialang.org/t/makie-adjusting-axis-scale-limits-in-3d/29231 "2021-02-07T20:10:10Z")

</div>

Hello, I would like to use very non-isotropic axis scales in 3D scatter plots. I can set the limits of the axis, but couldn’t find a working way of changing the data scaling in x/y/z (so that the plot is not overly stre…

---

## [Makie inplace plot recipe](https://discourse.julialang.org/t/makie-inplace-plot-recipe/54857)

<div class="topic-metadata">

**Author:** [@zekeriya.sari](https://discourse.julialang.org/u/zekeriya.sari)\
**Replies:** 6\
**Last updated:** [February 9, 2021, 8:34am UTC](https://discourse.julialang.org/t/makie-inplace-plot-recipe/54857 "2021-02-09T08:34:29Z")

</div>

Is it possible to define an in-place plotting recipe using Makie? For example, the following recipe works properly. using Makie @recipe(MyPlot, x, y) do scene Attributes( plot\_color = :red, ) end fu…

---

## [Vlines ymin, ymax](https://discourse.julialang.org/t/vlines-ymin-ymax/54671)

<div class="topic-metadata">

**Author:** [@ZettEff](https://discourse.julialang.org/u/ZettEff)\
**Replies:** 4\
**Last updated:** [February 8, 2021, 12:28pm UTC](https://discourse.julialang.org/t/vlines-ymin-ymax/54671 "2021-02-08T12:28:50Z")

</div>

Hi, I am using Plots with gr() backend and want to plot the errors of a linear regression model, i.e. indicate with vertical lines the difference between y and yhat. Essentially, I am looking for something similar to p…

---

## [Setting the x and y axis of a heatmap plot recipe](https://discourse.julialang.org/t/setting-the-x-and-y-axis-of-a-heatmap-plot-recipe/54821)

<div class="topic-metadata">

**Author:** [@ash](https://discourse.julialang.org/u/ash)\
**Replies:** 2\
**Last updated:** [February 8, 2021, 6:43am UTC](https://discourse.julialang.org/t/setting-the-x-and-y-axis-of-a-heatmap-plot-recipe/54821 "2021-02-08T06:43:15Z")

</div>

I am trying to create a recipe to plot a custom type like this: struct Sim{TT\<:Real, F} box::Box{TT} ψ::Array{Complex{TT}, 2} # other stuff end where struct Box{TT\<:Real} t::Array{TT, 1} x::Array{T…

---

## [Plots.jl - Combined Histogram and Distribution](https://discourse.julialang.org/t/plots-jl-combined-histogram-and-distribution/54656)

<div class="topic-metadata">

**Author:** [@phillc](https://discourse.julialang.org/u/phillc)\
**Replies:** 4\
**Last updated:** [February 5, 2021, 9:03am UTC](https://discourse.julialang.org/t/plots-jl-combined-histogram-and-distribution/54656 "2021-02-05T09:03:50Z")

</div>

I’m trying to convert some plots from R based examples to Julia. The R examples are found here: Essentially the single plot is a histogram of a probability distribution, with the corresponding Beta distribution plotte…

---

## [For Loops in Luxor](https://discourse.julialang.org/t/for-loops-in-luxor/54197)

<div class="topic-metadata">

**Author:** [@brett\_knoss](https://discourse.julialang.org/u/brett_knoss)\
**Replies:** 20\
**Last updated:** [February 4, 2021, 5:51pm UTC](https://discourse.julialang.org/t/for-loops-in-luxor/54197 "2021-02-04T17:51:09Z")

</div>

When I create a checker pattern using the rect function, it works perfectly: @svg begin Drawing(2000,2000) background("white") sethue("black") rect(500,0,500,500,:fill) rect(1500,0,500,500,:fill) rect(0,500,500,50…

---

## [GLMakie: recording a movie without displaying intermediate frames?](https://discourse.julialang.org/t/glmakie-recording-a-movie-without-displaying-intermediate-frames/54537)

<div class="topic-metadata">

**Author:** [@LaurentPlagne](https://discourse.julialang.org/u/LaurentPlagne)\
**Replies:** 1\
**Last updated:** [February 3, 2021, 7:30pm UTC](https://discourse.julialang.org/t/glmakie-recording-a-movie-without-displaying-intermediate-frames/54537 "2021-02-03T19:30:29Z")

</div>

Hi, I would like to use GLMakie on a remote machine without exporting a display. Note that I was not able to use WGLMakie because of speed issue neither CairoMakie because these are 3D plots. Is it possible to record …

---

## [Package for visualizing wireframe cube](https://discourse.julialang.org/t/package-for-visualizing-wireframe-cube/54400)

<div class="topic-metadata">

**Author:** [@EL-Bakkali-Jaafar](https://discourse.julialang.org/u/EL-Bakkali-Jaafar)\
**Replies:** 6\
**Last updated:** [February 3, 2021, 3:41pm UTC](https://discourse.julialang.org/t/package-for-visualizing-wireframe-cube/54400 "2021-02-03T15:41:37Z")

</div>

Hi all, What I am looking for is a package to draw a wireframe cube and to draw segment connecting two 3d points. Thanks.

---

## [Precompile errors Makie (AbstractPlotting)](https://discourse.julialang.org/t/precompile-errors-makie-abstractplotting/53810)

<div class="topic-metadata">

**Author:** [@fyzycyst](https://discourse.julialang.org/u/fyzycyst)\
**Replies:** 2\
**Last updated:** [February 2, 2021, 5:48pm UTC](https://discourse.julialang.org/t/precompile-errors-makie-abstractplotting/53810 "2021-02-02T17:48:42Z")

</div>

Attempted to try out Makie, but the precompile fails. I’m including a sample for the AbstractPlotting precompile, but it’s the same for CairoMakie, etc. I know similar problems are reported from time to time, but none of…

---

## [3d graph error](https://discourse.julialang.org/t/3d-graph-error/54224)

<div class="topic-metadata">

**Author:** [@Evan](https://discourse.julialang.org/u/Evan)\
**Replies:** 7\
**Last updated:** [February 1, 2021, 8:38am UTC](https://discourse.julialang.org/t/3d-graph-error/54224 "2021-02-01T08:38:31Z")

</div>

I’m getting an error from simple 3d plots, example of plot and error is below. What am i doing wrong? using Plots; pyplot() x=range(-2,stop=2,length=100) y=range(sqrt(2),stop=2,length=100) f(x,y) = x\*y-x-y+1 plot(x,…

---

## [Changing color/colorbar limits in a heat map in Plots.jl](https://discourse.julialang.org/t/changing-color-colorbar-limits-in-a-heat-map-in-plots-jl/54277)

<div class="topic-metadata">

**Author:** [@Peter\_Staab](https://discourse.julialang.org/u/Peter_Staab)\
**Replies:** 3\
**Last updated:** [January 31, 2021, 12:54pm UTC](https://discourse.julialang.org/t/changing-color-colorbar-limits-in-a-heat-map-in-plots-jl/54277 "2021-01-31T12:54:37Z")

</div>

I’m looking to change the range of colors on a heat map. For example: hm1 = heatmap(rand(20,20),aspect\_ratio=:equal) hm2 = heatmap(0.9\*rand(20,20),aspect\_ratio=:equal) plot(hm1,hm2) resulting in: defaults to 0-\>1 …

---

## [Changing the background color of a 3D Scene in Makie](https://discourse.julialang.org/t/changing-the-background-color-of-a-3d-scene-in-makie/53490)

<div class="topic-metadata">

**Author:** [@airpmb](https://discourse.julialang.org/u/airpmb)\
**Replies:** 8\
**Last updated:** [January 31, 2021, 10:34am UTC](https://discourse.julialang.org/t/changing-the-background-color-of-a-3d-scene-in-makie/53490 "2021-01-31T10:34:13Z")

</div>

How can I make the background color of a (3D) scene contained within an LScene ? Including backgroundcolor=:black in the scenekw arg doesn’t seem to do it, nor does setting the attribute directly on lscene.scene . Howeve…

---

## [Makie recipe usage](https://discourse.julialang.org/t/makie-recipe-usage/54292)

<div class="topic-metadata">

**Author:** [@henry2004y](https://discourse.julialang.org/u/henry2004y)\
**Replies:** 2\
**Last updated:** [January 31, 2021, 9:06am UTC](https://discourse.julialang.org/t/makie-recipe-usage/54292 "2021-01-31T09:06:17Z")

</div>

I read about a post makie-recipe-specialisation-for-specific-types for plotting customized types from Makie. The official document also has a Plot-Recipes section, but I still do not understand how to use it. Additionall…

---

## [One colorbar for all subplots using cartopy mapping via PyCall](https://discourse.julialang.org/t/one-colorbar-for-all-subplots-using-cartopy-mapping-via-pycall/54134)

<div class="topic-metadata">

**Author:** [@EuRoXy](https://discourse.julialang.org/u/EuRoXy)\
**Replies:** 6\
**Last updated:** [January 29, 2021, 4:16pm UTC](https://discourse.julialang.org/t/one-colorbar-for-all-subplots-using-cartopy-mapping-via-pycall/54134 "2021-01-29T16:16:04Z")

</div>

I try to generate a shared colorbar for several subplots using cartopy via PyCall and PyPlot but haven’t succeeded. Here’s a minimal code example with separate colorbars: using PyCall, PyPlot plt = pyimport("matplotlib…

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

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