# Visualization

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

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

**Page:** 72

---

## [Packages for Drawing and Graphics](https://discourse.julialang.org/t/packages-for-drawing-and-graphics/54153)

<div class="topic-metadata">

**Author:** [@brett\_knoss](https://discourse.julialang.org/u/brett_knoss)\
**Replies:** 14\
**Last updated:** [January 29, 2021, 4:14pm UTC](https://discourse.julialang.org/t/packages-for-drawing-and-graphics/54153 "2021-01-29T16:14:12Z")

</div>

What packages do I use for graphics? I found Cairo.jl and Graphics.jl the latter says it uses the former as a backend, but Graphics.jl is missing a lot of docstrings and looks abandoned.

---

## [Make transparent square in Gadfly](https://discourse.julialang.org/t/make-transparent-square-in-gadfly/54116)

<div class="topic-metadata">

**Author:** [@fredih](https://discourse.julialang.org/u/fredih)\
**Replies:** 4\
**Last updated:** [January 29, 2021, 12:54pm UTC](https://discourse.julialang.org/t/make-transparent-square-in-gadfly/54116 "2021-01-29T12:54:07Z")

</div>

I want to plot a transparent square over certain time ranges in the Gantt chart @Mattriks created here. It looks like this: And I want it to look somtehing like this: How could I do it?

---

## [Julia Plots savefig whitespace issue](https://discourse.julialang.org/t/julia-plots-savefig-whitespace-issue/54081)

<div class="topic-metadata">

**Author:** [@gideonsimpson](https://discourse.julialang.org/u/gideonsimpson)\
**Replies:** 3\
**Last updated:** [January 28, 2021, 3:21am UTC](https://discourse.julialang.org/t/julia-plots-savefig-whitespace-issue/54081 "2021-01-28T03:21:57Z")

</div>

When saving figures generated by Plots.jl with the pyplot, is there a straightforward way to trim the extra whitespace when I call savefig?

---

## [Plot integrals](https://discourse.julialang.org/t/plot-integrals/54087)

<div class="topic-metadata">

**Author:** [@brett\_knoss](https://discourse.julialang.org/u/brett_knoss)\
**Replies:** 6\
**Last updated:** [January 27, 2021, 11:27pm UTC](https://discourse.julialang.org/t/plot-integrals/54087 "2021-01-27T23:27:53Z")

</div>

I can plot derivatives using ForwardDiff and Plots using ForwardDiff using Plots f(x)=x^2 df(x)=ForwardDiff.derivative(f(x), x) plot(df) but QuadGK.jl gives two answers so this method won’t work. Is there a way to pl…

---

## [Dispatch with @userplot and external recipes](https://discourse.julialang.org/t/dispatch-with-userplot-and-external-recipes/54045)

<div class="topic-metadata">

**Author:** [@Libbum](https://discourse.julialang.org/u/Libbum)\
**Replies:** 1\
**Last updated:** [January 27, 2021, 7:54pm UTC](https://discourse.julialang.org/t/dispatch-with-userplot-and-external-recipes/54045 "2021-01-27T19:54:24Z")

</div>

Hi all, I’m trying to learn the Plots.jl recipe syntax and have a few design questions. Say I have struct MyData{T} where {T\<:Union{One,Two}} ... end I’d like to define @userplot PlotCustom for this, and provide t…

---

## [Marker shapes in Plots](https://discourse.julialang.org/t/marker-shapes-in-plots/53806)

<div class="topic-metadata">

**Author:** [@yarahmad](https://discourse.julialang.org/u/yarahmad)\
**Replies:** 2\
**Last updated:** [January 27, 2021, 12:37pm UTC](https://discourse.julialang.org/t/marker-shapes-in-plots/53806 "2021-01-27T12:37:57Z")

</div>

I have to use two marker shapes say: circle and star5, to plot some simulation results via scatter plot. However, the second marker shape, apart from its type, does not appear in plots. I have been trying different ways …

---

## [What is best practice for adding OpenCV as a dependency in a Julia Package?](https://discourse.julialang.org/t/what-is-best-practice-for-adding-opencv-as-a-dependency-in-a-julia-package/53990)

<div class="topic-metadata">

**Author:** [@Erik\_Engheim](https://discourse.julialang.org/u/Erik_Engheim)\
**Replies:** 7\
**Last updated:** [January 26, 2021, 4:11pm UTC](https://discourse.julialang.org/t/what-is-best-practice-for-adding-opencv-as-a-dependency-in-a-julia-package/53990 "2021-01-26T16:11:05Z")

</div>

I went through the recipe online for building the Julia OpenCV bindings. It is all based on CxxWrap to automatically create the bindings. So I get something locally installed, but I cannot add OpenCV as a dependency to m…

---

## [How to connect an event handler to a button in Makie.jl?](https://discourse.julialang.org/t/how-to-connect-an-event-handler-to-a-button-in-makie-jl/53851)

<div class="topic-metadata">

**Author:** [@ufechner7](https://discourse.julialang.org/u/ufechner7)\
**Replies:** 3\
**Last updated:** [January 24, 2021, 9:13am UTC](https://discourse.julialang.org/t/how-to-connect-an-event-handler-to-a-button-in-makie-jl/53851 "2021-01-24T09:13:47Z")

</div>

How can I execute a function when I press a button in Makie? This is missing in the documentation. Example: using GeometryBasics, GLMakie function reset() # set camera and zoom to default values end function mai…

---

## [Can I paint the background of a plot?](https://discourse.julialang.org/t/can-i-paint-the-background-of-a-plot/53807)

<div class="topic-metadata">

**Author:** [@klaff](https://discourse.julialang.org/u/klaff)\
**Replies:** 9\
**Last updated:** [January 23, 2021, 2:30pm UTC](https://discourse.julialang.org/t/can-i-paint-the-background-of-a-plot/53807 "2021-01-23T14:30:38Z")

</div>

I would like to make a function f(x,y) that returns a color and give that to plot to create the background of the plot. Is there something close to this on one of the plotting packages? Thanks.

---

## [Overlay a contour over a heatmap](https://discourse.julialang.org/t/overlay-a-contour-over-a-heatmap/53586)

<div class="topic-metadata">

**Author:** [@fkguo](https://discourse.julialang.org/u/fkguo)\
**Replies:** 13\
**Last updated:** [January 23, 2021, 12:02pm UTC](https://discourse.julialang.org/t/overlay-a-contour-over-a-heatmap/53586 "2021-01-23T12:02:11Z")

</div>

Hello, I have difficulty overlaying a contour plot over a heatmap. Here is an example let f(x,y) = (x + 2y^2) \* abs(sin(y) + cos(x)) p1 = heatmap(1:0.5:20, 1:0.5:20, f, alpha=0.3) p2 = Plots.contourf(1:0.5:…

---

## [Displaying rack diagrams in Pluto - or in general really](https://discourse.julialang.org/t/displaying-rack-diagrams-in-pluto-or-in-general-really/53775)

<div class="topic-metadata">

**Author:** [@johnh](https://discourse.julialang.org/u/johnh)\
**Replies:** 2\
**Last updated:** [January 22, 2021, 12:21pm UTC](https://discourse.julialang.org/t/displaying-rack-diagrams-in-pluto-or-in-general-really/53775 "2021-01-22T12:21:30Z")

</div>

If I have some data which I want to be displayed as rectangular boxes which contain a name, what is a good way of doing this? Specifically these are rack diagrams - which are normally displayed in Visio or indeed Excel …

---

## [How to use @layout in plots?](https://discourse.julialang.org/t/how-to-use-layout-in-plots/53722)

<div class="topic-metadata">

**Author:** [@Torkel](https://discourse.julialang.org/u/Torkel)\
**Replies:** 3\
**Last updated:** [January 22, 2021, 12:12pm UTC](https://discourse.julialang.org/t/how-to-use-layout-in-plots/53722 "2021-01-22T12:12:40Z")

</div>

Hello, I am trying to create layouts for subplots, which are not pure grids. However, I find very little instructions on this. What I have found is a small section in the docs (Layouts · Plots which also contains a brok…

---

## [Plots.jl: How can I get discrete colors in the colorbar of a heatmap?](https://discourse.julialang.org/t/plots-jl-how-can-i-get-discrete-colors-in-the-colorbar-of-a-heatmap/29660)

<div class="topic-metadata">

**Author:** [@NiclasMattsson](https://discourse.julialang.org/u/NiclasMattsson)\
**Replies:** 15\
**Last updated:** [January 21, 2021, 12:33am UTC](https://discourse.julialang.org/t/plots-jl-how-can-i-get-discrete-colors-in-the-colorbar-of-a-heatmap/29660 "2021-01-21T00:33:41Z")

</div>

Simple example: julia\> r = rand(0:10,10,10) 10×10 Array{Int64,2}: 0 4 10 1 10 1 6 3 6 3 9 7 9 3 8 4 3 1 6 8 8 7 6 2 8 7 8 8 2 9 3 7 2 0 0 7 8 0 9 5 …

---

## [Increase thickness of axises](https://discourse.julialang.org/t/increase-thickness-of-axises/53683)

<div class="topic-metadata">

**Author:** [@Torkel](https://discourse.julialang.org/u/Torkel)\
**Replies:** 0\
**Last updated:** [January 20, 2021, 7:50pm UTC](https://discourse.julialang.org/t/increase-thickness-of-axises/53683 "2021-01-20T19:50:35Z")

</div>

How do I increase the thickness of the axis using plots? I have found all kinds of options under attributes, e.g. I can change color with foreground\_color\_border=:red, but the thickness I haven’t found anything for.

---

## [Quiver arrows changes style when ploting plot as subplot](https://discourse.julialang.org/t/quiver-arrows-changes-style-when-ploting-plot-as-subplot/53681)

<div class="topic-metadata">

**Author:** [@Torkel](https://discourse.julialang.org/u/Torkel)\
**Replies:** 0\
**Last updated:** [January 20, 2021, 6:01pm UTC](https://discourse.julialang.org/t/quiver-arrows-changes-style-when-ploting-plot-as-subplot/53681 "2021-01-20T18:01:33Z")

</div>

I want to create a couple of plots, and then compile them into a single figure. One of the subplots containing quiver arrows, and they behave weirdly when I do so. The code and figures should demonstrate quite well in th…

---

## [Expected speed of WGLMakie](https://discourse.julialang.org/t/expected-speed-of-wglmakie/53673)

<div class="topic-metadata">

**Author:** [@LaurentPlagne](https://discourse.julialang.org/u/LaurentPlagne)\
**Replies:** 0\
**Last updated:** [January 20, 2021, 3:24pm UTC](https://discourse.julialang.org/t/expected-speed-of-wglmakie/53673 "2021-01-20T15:24:38Z")

</div>

Hi, I wonder what is the expected speed of WGLMakie compared to GLMakie. The following MWE takes 20s with WGLMakie compared to 0.8s using GLMakie. Is is expected ? Could someone explain the difference ? MWEusing GLMak…

---

## [Gadfly plot failing (suspect numerical issues)](https://discourse.julialang.org/t/gadfly-plot-failing-suspect-numerical-issues/53576)

<div class="topic-metadata">

**Author:** [@JonT](https://discourse.julialang.org/u/JonT)\
**Replies:** 4\
**Last updated:** [January 20, 2021, 4:49am UTC](https://discourse.julialang.org/t/gadfly-plot-failing-suspect-numerical-issues/53576 "2021-01-20T04:49:24Z")

</div>

I have a situation where I am trying to plot errors, which are small but are nowhere near subnormal numbers in Float64. Unfortunately, plot() is producing an incorrect graph, using Gadfly 1.3.1 in Julia 1.5.3. Here is …

---

## [Positioning a volume with Makie](https://discourse.julialang.org/t/positioning-a-volume-with-makie/53621)

<div class="topic-metadata">

**Author:** [@Flausi](https://discourse.julialang.org/u/Flausi)\
**Replies:** 2\
**Last updated:** [January 19, 2021, 6:54pm UTC](https://discourse.julialang.org/t/positioning-a-volume-with-makie/53621 "2021-01-19T18:54:04Z")

</div>

Hello, I would like to plot a three-dimensional matrix as a volume at an arbitrary location in space with Makie.jl. using GLMakie using AbstractPlotting x = LinRange(1, 200, 200) y = LinRange(1, 200, 200) z = LinRange(…

---

## [Any advice on Stereo Matching in Julia?](https://discourse.julialang.org/t/any-advice-on-stereo-matching-in-julia/53552)

<div class="topic-metadata">

**Author:** [@Erik\_Engheim](https://discourse.julialang.org/u/Erik_Engheim)\
**Replies:** 2\
**Last updated:** [January 19, 2021, 11:05am UTC](https://discourse.julialang.org/t/any-advice-on-stereo-matching-in-julia/53552 "2021-01-19T11:05:56Z")

</div>

I am looking to do stereo matching in Julia, basically to find the depth in an image by using two images. I am at an early stage and would appreciate some advice on where to look for information, and what libraries are …

---

## [Makie in vmware player](https://discourse.julialang.org/t/makie-in-vmware-player/53439)

<div class="topic-metadata">

**Author:** [@ufechner7](https://discourse.julialang.org/u/ufechner7)\
**Replies:** 1\
**Last updated:** [January 16, 2021, 8:32pm UTC](https://discourse.julialang.org/t/makie-in-vmware-player/53439 "2021-01-16T20:32:48Z")

</div>

I am trying to make Makie.jl work within a virtual machine. I can install it successfully using the following setup: ubuntu 18.04 host with nvidia 390.141 driver cinamon 20.1 running in vmware player But when I execut…

---

## [From Python-cgkit to Makie.jl](https://discourse.julialang.org/t/from-python-cgkit-to-makie-jl/52129)

<div class="topic-metadata">

**Author:** [@ufechner7](https://discourse.julialang.org/u/ufechner7)\
**Replies:** 3\
**Last updated:** [January 16, 2021, 6:11pm UTC](https://discourse.julialang.org/t/from-python-cgkit-to-makie-jl/52129 "2021-01-16T18:11:27Z")

</div>

I am trying to convert the 3D viewer of my kitepower system simulator (Bitbucket) to Julia/ Makie.jl. The old Python/C++ library is unsupported since 8 years and the newest system where it works is Ubuntu 14.04, so I …

---

## [Plots (PyPlot) - Set legend title font size](https://discourse.julialang.org/t/plots-pyplot-set-legend-title-font-size/31763)

<div class="topic-metadata">

**Author:** [@timmm](https://discourse.julialang.org/u/timmm)\
**Replies:** 2\
**Last updated:** [January 16, 2021, 2:40pm UTC](https://discourse.julialang.org/t/plots-pyplot-set-legend-title-font-size/31763 "2021-01-16T14:40:10Z")

</div>

Hi, When using Plots (PyPlot backend) I cant seem to control the font size of the legends title: using Plots, LaTeXStrings pyplot() upscale = 2 #Xx upscaling in resolution p=plot( ) fntsm = Plots.font("sans-serif", po…

---

## [Adding a new line to a candlestick plot](https://discourse.julialang.org/t/adding-a-new-line-to-a-candlestick-plot/53375)

<div class="topic-metadata">

**Author:** [@colintbowers](https://discourse.julialang.org/u/colintbowers)\
**Replies:** 7\
**Last updated:** [January 15, 2021, 10:19am UTC](https://discourse.julialang.org/t/adding-a-new-line-to-a-candlestick-plot/53375 "2021-01-15T10:19:29Z")

</div>

Hi all, The TimeSeries.jl package allows the construction of a candlestick plot. This works very nicely for me. However, sometimes I’d like to add another line to overlay the candlestick plot. I’ve been messing around f…

---

## [Interactive visualization of multidimensional array](https://discourse.julialang.org/t/interactive-visualization-of-multidimensional-array/53356)

<div class="topic-metadata">

**Author:** [@ElOceanografo](https://discourse.julialang.org/u/ElOceanografo)\
**Replies:** 0\
**Last updated:** [January 14, 2021, 8:34pm UTC](https://discourse.julialang.org/t/interactive-visualization-of-multidimensional-array/53356 "2021-01-14T20:34:39Z")

</div>

I’ve got a 3D array, representing vector-valued observations at each location on a 2D grid. I’d like to find a way to plot this array so that one subplot shows a spatial slice, while a second subplot shows the data valu…

---

## [Makie does not display when mesh function is called in a loop](https://discourse.julialang.org/t/makie-does-not-display-when-mesh-function-is-called-in-a-loop/35983)

<div class="topic-metadata">

**Author:** [@brianguenter](https://discourse.julialang.org/u/brianguenter)\
**Replies:** 5\
**Last updated:** [January 14, 2021, 8:16pm UTC](https://discourse.julialang.org/t/makie-does-not-display-when-mesh-function-is-called-in-a-loop/35983 "2021-01-14T20:16:20Z")

</div>

I wrote a Makie function to draw several meshes in the same window but couldn’t get anything to display. Eventually simplified to the problem to this: if the Makie.mesh! function is called in a loop nothing displays, eve…

---

## [Move a plane with slider in Makie.jl](https://discourse.julialang.org/t/move-a-plane-with-slider-in-makie-jl/53258)

<div class="topic-metadata">

**Author:** [@Flausi](https://discourse.julialang.org/u/Flausi)\
**Replies:** 0\
**Last updated:** [January 12, 2021, 10:06pm UTC](https://discourse.julialang.org/t/move-a-plane-with-slider-in-makie-jl/53258 "2021-01-12T22:06:53Z")

</div>

Hello, I tried to use Makie.jl to move a layer in a spatial plot via a slider and update the data depending on how the slider is set. This actually works quite well, but the layer is not moved with the ‘transformation -…

---

## [Having a hard time visualizing LazySets.HPolyHedron & HPolytope](https://discourse.julialang.org/t/having-a-hard-time-visualizing-lazysets-hpolyhedron-hpolytope/52721)

<div class="topic-metadata">

**Author:** [@adropintheriver](https://discourse.julialang.org/u/adropintheriver)\
**Replies:** 1\
**Last updated:** [January 11, 2021, 6:10pm UTC](https://discourse.julialang.org/t/having-a-hard-time-visualizing-lazysets-hpolyhedron-hpolytope/52721 "2021-01-11T18:10:28Z")

</div>

Q.1 what is the right way to render the following a. HPolyhedron/HPolytope b. Set of points (3D) so the code below from Polyhedra docs A = rand(HPolyhedron,dim=3) HPoly = Polytope(constraints\_list(A)) remove\_redunda…

---

## [Why are vertices of every LazySets.VPolygon or VPolytope given as 1 D Array and not based on the shape of the object?](https://discourse.julialang.org/t/why-are-vertices-of-every-lazysets-vpolygon-or-vpolytope-given-as-1-d-array-and-not-based-on-the-shape-of-the-object/52719)

<div class="topic-metadata">

**Author:** [@adropintheriver](https://discourse.julialang.org/u/adropintheriver)\
**Replies:** 1\
**Last updated:** [January 11, 2021, 5:49pm UTC](https://discourse.julialang.org/t/why-are-vertices-of-every-lazysets-vpolygon-or-vpolytope-given-as-1-d-array-and-not-based-on-the-shape-of-the-object/52719 "2021-01-11T17:49:32Z")

</div>

A = rand(HPolyhedron,dim=3) Av = tovrep(A) Av.vertices gives an 11-element Array{Array{Float64,1},1} and not a 3 Dimensional array of 11 elements, also how can i convert these vertices to BasicGeometry.Point3d without u…

---

## [Drawing text over pixels of an image](https://discourse.julialang.org/t/drawing-text-over-pixels-of-an-image/53040)

<div class="topic-metadata">

**Author:** [@claforte](https://discourse.julialang.org/u/claforte)\
**Replies:** 2\
**Last updated:** [January 10, 2021, 5:37am UTC](https://discourse.julialang.org/t/drawing-text-over-pixels-of-an-image/53040 "2021-01-10T05:37:23Z")

</div>

Hello Julia plotting experts, I want to annotate images by drawing text over the pixels of an image. This is to generate a lossless video where each frame shows an animated grid of tiles, each output by a different super…

---

## [Mesh3D Only Plotting Half](https://discourse.julialang.org/t/mesh3d-only-plotting-half/52760)

<div class="topic-metadata">

**Author:** [@Nkrause](https://discourse.julialang.org/u/Nkrause)\
**Replies:** 15\
**Last updated:** [January 6, 2021, 3:35pm UTC](https://discourse.julialang.org/t/mesh3d-only-plotting-half/52760 "2021-01-06T15:35:44Z")

</div>

Hello, I’m trying to plot a 3d surface. I’ve used a marching cubes algorithm to generate a tuple of points. When I plot them in scatter() I get the following image, which is what I want and expect. scatter(\[a for (a,…

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

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