# Visualization

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

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

**Page:** 52

---

## [Transferring \*all\* plotted elements (and their links to observables) between Axis](https://discourse.julialang.org/t/transferring-all-plotted-elements-and-their-links-to-observables-between-axis/79492)

<div class="topic-metadata">

**Author:** [@Datseris](https://discourse.julialang.org/u/Datseris)\
**Replies:** 2\
**Last updated:** [April 14, 2022, 2:26pm UTC](https://discourse.julialang.org/t/transferring-all-plotted-elements-and-their-links-to-observables-between-axis/79492 "2022-04-14T14:26:02Z")

</div>

I admit, I’m not particularly optimistic whether this is possible, but here goes. I have a fig, ax, which is an Axis/Axis3 plotted on a Figure. On this axis many things are plotted, and many of the plotted things are ob…

---

## [Valid values for attributes: is there a list or a way to look them up?](https://discourse.julialang.org/t/valid-values-for-attributes-is-there-a-list-or-a-way-to-look-them-up/79386)

<div class="topic-metadata">

**Author:** [@weltenbummler](https://discourse.julialang.org/u/weltenbummler)\
**Replies:** 2\
**Last updated:** [April 14, 2022, 10:40am UTC](https://discourse.julialang.org/t/valid-values-for-attributes-is-there-a-list-or-a-way-to-look-them-up/79386 "2022-04-14T10:40:23Z")

</div>

Hello, In makie, I can look up a list with attributes by e.g. writing fig = Figure() ax = Axis(fig\[1,1\]) ax.attributes It lists the attributes and shows the current settings. However, how can I find out the valid valu…

---

## [PlotlyJS 3d scatter plot does not respect zmin and zmax](https://discourse.julialang.org/t/plotlyjs-3d-scatter-plot-does-not-respect-zmin-and-zmax/79475)

<div class="topic-metadata">

**Author:** [@Jae-Mo\_Lihm](https://discourse.julialang.org/u/Jae-Mo_Lihm)\
**Replies:** 2\
**Last updated:** [April 14, 2022, 9:15am UTC](https://discourse.julialang.org/t/plotlyjs-3d-scatter-plot-does-not-respect-zmin-and-zmax/79475 "2022-04-14T09:15:38Z")

</div>

How can I fix zmin and zmax in the colorscale? using PlotlyJS PlotlyJS.plot(PlotlyJS.scatter( x=\[0, 1\], y=\[0, 1\], mode="markers", marker=attr( size = 10, color = \[-2, 1\], showscale =…

---

## [PyPlot for PythonCall](https://discourse.julialang.org/t/pyplot-for-pythoncall/79407)

<div class="topic-metadata">

**Author:** [@goerz](https://discourse.julialang.org/u/goerz)\
**Replies:** 3\
**Last updated:** [April 14, 2022, 2:27am UTC](https://discourse.julialang.org/t/pyplot-for-pythoncall/79407 "2022-04-14T02:27:20Z")

</div>

The PyPlot backend for Plots.jl only works with PyCall, right? How hard would it be to make work with PythonCall instead (so I don’t even have to have PyCall installed). I’d very much appreciate the full environment isol…

---

## [Makie Unfilled Polygons](https://discourse.julialang.org/t/makie-unfilled-polygons/79440)

<div class="topic-metadata">

**Author:** [@LaurentPlagne](https://discourse.julialang.org/u/LaurentPlagne)\
**Replies:** 4\
**Last updated:** [April 13, 2022, 9:10pm UTC](https://discourse.julialang.org/t/makie-unfilled-polygons/79440 "2022-04-13T21:10:17Z")

</div>

Hi, what is the syntax to plot unfilled/empty polygons (via Makie.poly!) ?

---

## [Intersection of two rotated rectangles?](https://discourse.julialang.org/t/intersection-of-two-rotated-rectangles/79312)

<div class="topic-metadata">

**Author:** [@vshesh](https://discourse.julialang.org/u/vshesh)\
**Replies:** 6\
**Last updated:** [April 12, 2022, 12:20am UTC](https://discourse.julialang.org/t/intersection-of-two-rotated-rectangles/79312 "2022-04-12T00:20:26Z")

</div>

Is there a julia implemented version of deciding whether two rects intersect? rects are rotated about their top left corner, specified as \[x, y, width, height, angle\] so for example: \> collision(\[0,0,100,100,0\], \[40,4…

---

## [Makie rotate colorbar label](https://discourse.julialang.org/t/makie-rotate-colorbar-label/79263)

<div class="topic-metadata">

**Author:** [@jewh](https://discourse.julialang.org/u/jewh)\
**Replies:** 5\
**Last updated:** [April 10, 2022, 12:44pm UTC](https://discourse.julialang.org/t/makie-rotate-colorbar-label/79263 "2022-04-10T12:44:41Z")

</div>

How do I rotate the label on the colorbar in Makie? MWE: using CairoMakie M = rand(10, 10) fig = CairoMakie.Figure() ax = Axis(fig\[1,1\]) cplot = CairoMakie.contourf!(fig\[1,1\], 1:10, 1:10, M) Colorbar(fig\[1,2\], cplot, …

---

## [CairoMakie contourf set colour limits](https://discourse.julialang.org/t/cairomakie-contourf-set-colour-limits/79261)

<div class="topic-metadata">

**Author:** [@jewh](https://discourse.julialang.org/u/jewh)\
**Replies:** 13\
**Last updated:** [April 10, 2022, 11:12am UTC](https://discourse.julialang.org/t/cairomakie-contourf-set-colour-limits/79261 "2022-04-10T11:12:16Z")

</div>

How do I change the limits for my colour scale in a CairoMakie contourf plot? For instance say I want to plot my data on a contour plot, with a colour bar: using CairoMakie M = rand(10, 10) / 10. # get data ∈ \[0, 1\] a…

---

## [PGFPlotsX: annotate outside plot area](https://discourse.julialang.org/t/pgfplotsx-annotate-outside-plot-area/58357)

<div class="topic-metadata">

**Author:** [@lmiq](https://discourse.julialang.org/u/lmiq)\
**Replies:** 5\
**Last updated:** [April 9, 2022, 10:47am UTC](https://discourse.julialang.org/t/pgfplotsx-annotate-outside-plot-area/58357 "2022-04-09T10:47:52Z")

</div>

How can I put annotations outside the plotting area of a plot in PGFPlotsX? Example: using Plots pgfplotsx(grid=:false) scatter(rand(5),rand(5),xlim=\[0,1\],ylim=\[0,1\]) annotate!(0.5,0.5,text("inside plot")) annotate!(0,…

---

## [Custum DataInspector display-value \[Makie\]](https://discourse.julialang.org/t/custum-datainspector-display-value-makie/79235)

<div class="topic-metadata">

**Author:** [@TheLateKronos](https://discourse.julialang.org/u/TheLateKronos)\
**Replies:** 1\
**Last updated:** [April 8, 2022, 8:24pm UTC](https://discourse.julialang.org/t/custum-datainspector-display-value-makie/79235 "2022-04-08T20:24:13Z")

</div>

I have a scatterplot, showing the time-evolution of some neural networks (x-axis = time) against performance (y-axis = performance). Each network has an ID. It would be fantastic if I could get the network ID (which I wo…

---

## [Is there a way to combine 4+ channels in a single image? (Images.jl)](https://discourse.julialang.org/t/is-there-a-way-to-combine-4-channels-in-a-single-image-images-jl/17249)

<div class="topic-metadata">

**Author:** [@wrgr](https://discourse.julialang.org/u/wrgr)\
**Replies:** 7\
**Last updated:** [April 7, 2022, 6:53pm UTC](https://discourse.julialang.org/t/is-there-a-way-to-combine-4-channels-in-a-single-image-images-jl/17249 "2022-04-07T18:53:30Z")

</div>

Input: 4-5 intensity channels, represented as 2D arrays with elements in \[0, 1\]. Problem: combine and display them in a single image, giving each channel a specific color, e.g. yellow, red, green, blue for 4 channels, u…

---

## [Plot one point with a label](https://discourse.julialang.org/t/plot-one-point-with-a-label/79138)

<div class="topic-metadata">

**Author:** [@Katamari](https://discourse.julialang.org/u/Katamari)\
**Replies:** 3\
**Last updated:** [April 7, 2022, 9:50am UTC](https://discourse.julialang.org/t/plot-one-point-with-a-label/79138 "2022-04-07T09:50:08Z")

</div>

I would like to plot labeled points. The code I wrote to try it out is below. using CairoMakie function point(x; label=L"%$x") scatter!((x, 0);color=:black) text!(label, position=(x-0.05, 0.1)) end fig, ax=lines…

---

## [Adding Error Bars To Legend](https://discourse.julialang.org/t/adding-error-bars-to-legend/79018)

<div class="topic-metadata">

**Author:** [@cmdenis](https://discourse.julialang.org/u/cmdenis)\
**Replies:** 2\
**Last updated:** [April 6, 2022, 7:18pm UTC](https://discourse.julialang.org/t/adding-error-bars-to-legend/79018 "2022-04-06T19:18:52Z")

</div>

Hi, I’m trying to make a plot (with Plots) with some data points. I’d like to be able to add an entry to the legend labeling the error bars. So far I have something of the sort: scatter( rand(10), yerr = rand(…

---

## [Makie: layout question](https://discourse.julialang.org/t/makie-layout-question/79020)

<div class="topic-metadata">

**Author:** [@vettert](https://discourse.julialang.org/u/vettert)\
**Replies:** 2\
**Last updated:** [April 5, 2022, 9:36am UTC](https://discourse.julialang.org/t/makie-layout-question/79020 "2022-04-05T09:36:41Z")

</div>

I am having trouble adjusting the layout in my figure in Makie. Here is a screenshot of the figure that I manage to create: Now, I would really like to adjust the whitespace between the colorbar and my triangular con…

---

## [Plot image at (x,y) location on scatter plot](https://discourse.julialang.org/t/plot-image-at-x-y-location-on-scatter-plot/78928)

<div class="topic-metadata">

**Author:** [@afishy](https://discourse.julialang.org/u/afishy)\
**Replies:** 3\
**Last updated:** [April 4, 2022, 1:42am UTC](https://discourse.julialang.org/t/plot-image-at-x-y-location-on-scatter-plot/78928 "2022-04-04T01:42:55Z")

</div>

Let’s say I’ve done some clustering on my data (like in the image below) and want to show a representative image (i.e. an MxN matrix) from that cluster overlaid at an (x,y) coordinate near that cluster’s center. Is this …

---

## [How to plot in grayscale with gadfly?](https://discourse.julialang.org/t/how-to-plot-in-grayscale-with-gadfly/78780)

<div class="topic-metadata">

**Author:** [@Henrique\_Becker](https://discourse.julialang.org/u/Henrique_Becker)\
**Replies:** 3\
**Last updated:** [March 31, 2022, 11:17pm UTC](https://discourse.julialang.org/t/how-to-plot-in-grayscale-with-gadfly/78780 "2022-03-31T23:17:48Z")

</div>

Hi, I have some code roughly like this: using DataFrames using Gadfly df = DataFrame( :percent\_barrier =\> sqrt.(rand(100)) .\* 100, :stop\_reason =\> ifelse.(rand(100) .\> 0.75, "Solved", "Timeout") ) plot( df,…

---

## [Change xlabel position](https://discourse.julialang.org/t/change-xlabel-position/78812)

<div class="topic-metadata">

**Author:** [@jewh](https://discourse.julialang.org/u/jewh)\
**Replies:** 2\
**Last updated:** [March 31, 2022, 5:28pm UTC](https://discourse.julialang.org/t/change-xlabel-position/78812 "2022-03-31T17:28:45Z")

</div>

How can I adjust the position of the x-label in a plot using Plots.jl? e.g. if I do using Plots gr() # making it explicit I'm using the GR backend plot(1:10, rand(1:2, 10)) xlabel!("my nice xlabel") I get a plot with …

---

## [Legend grows outside the image](https://discourse.julialang.org/t/legend-grows-outside-the-image/78823)

<div class="topic-metadata">

**Author:** [@feanor12](https://discourse.julialang.org/u/feanor12)\
**Replies:** 1\
**Last updated:** [March 31, 2022, 5:05pm UTC](https://discourse.julialang.org/t/legend-grows-outside-the-image/78823 "2022-03-31T17:05:51Z")

</div>

I realized that when using Plots with GR the legend can grow outside the image. Is there a way to center the legend? The right edge of the legend seems to be fixed at the center of the image as it grows. plot(rand(10)…

---

## [Make - How to change the color of axes & grids in LScene?](https://discourse.julialang.org/t/make-how-to-change-the-color-of-axes-grids-in-lscene/78641)

<div class="topic-metadata">

**Author:** [@Bob\_Bass](https://discourse.julialang.org/u/Bob_Bass)\
**Replies:** 0\
**Last updated:** [March 29, 2022, 12:24am UTC](https://discourse.julialang.org/t/make-how-to-change-the-color-of-axes-grids-in-lscene/78641 "2022-03-29T00:24:27Z")

</div>

Hi. I prefer a grey or darker background for my plots, but then I can’t see the grid lines or axes. How do I change the color of the grids/axes, if possible? I am using the LScene function rather than the Axis3 functi…

---

## [Makie - How to get a (single) random color for a line/scatter/segment, etc?](https://discourse.julialang.org/t/makie-how-to-get-a-single-random-color-for-a-line-scatter-segment-etc/78634)

<div class="topic-metadata">

**Author:** [@Bob\_Bass](https://discourse.julialang.org/u/Bob_Bass)\
**Replies:** 2\
**Last updated:** [March 28, 2022, 8:06pm UTC](https://discourse.julialang.org/t/makie-how-to-get-a-single-random-color-for-a-line-scatter-segment-etc/78634 "2022-03-28T20:06:16Z")

</div>

Makie.jl question: This code puts a red dot in a 2d axes scatter(\[1\],\[2\], color=:red) but I want to have a dot with a random color. The docs say that I can pass a Real number to the color attribute, but when I do th…

---

## [Make a Compose.jl composition square](https://discourse.julialang.org/t/make-a-compose-jl-composition-square/78585)

<div class="topic-metadata">

**Author:** [@theta](https://discourse.julialang.org/u/theta)\
**Replies:** 4\
**Last updated:** [March 28, 2022, 5:14am UTC](https://discourse.julialang.org/t/make-a-compose-jl-composition-square/78585 "2022-03-28T05:14:37Z")

</div>

I’m messing with Compose.jl, and I noticed that the “canvas” isn’t square like I would expect. Does anyone know how to create an explicitly square canvas? I’m using ElectronDisplay to view the SVG output from Compose, bu…

---

## [Modify colorbar in heatmap](https://discourse.julialang.org/t/modify-colorbar-in-heatmap/78544)

<div class="topic-metadata">

**Author:** [@RickDW](https://discourse.julialang.org/u/RickDW)\
**Replies:** 2\
**Last updated:** [March 27, 2022, 3:02pm UTC](https://discourse.julialang.org/t/modify-colorbar-in-heatmap/78544 "2022-03-27T15:02:58Z")

</div>

Hi, I’m trying to create an animation from a sequence of heatmaps, and I want to keep the upper and lower limits of the colorbar steady. I.e. if a value of say 0.5 is plotted using pure white in one frame I want 0.5 to m…

---

## [Regression plots usin Makie.jl](https://discourse.julialang.org/t/regression-plots-usin-makie-jl/78485)

<div class="topic-metadata">

**Author:** [@bicepjai](https://discourse.julialang.org/u/bicepjai)\
**Replies:** 0\
**Last updated:** [March 25, 2022, 6:24pm UTC](https://discourse.julialang.org/t/regression-plots-usin-makie-jl/78485 "2022-03-25T18:24:35Z")

</div>

There are examples for plotting linear regression using Tutorial 🐧 · Algebra of Graphics ,but i lose all the customization with GitHub - JuliaPlots/Makie.jl: High level plotting on the GPU. Thanks for amazing plotting …

---

## ["Crunch" RGB pixels into 0-1 range](https://discourse.julialang.org/t/crunch-rgb-pixels-into-0-1-range/78428)

<div class="topic-metadata">

**Author:** [@theta](https://discourse.julialang.org/u/theta)\
**Replies:** 3\
**Last updated:** [March 24, 2022, 11:17pm UTC](https://discourse.julialang.org/t/crunch-rgb-pixels-into-0-1-range/78428 "2022-03-24T23:17:36Z")

</div>

Hi, I’m messing around with image generation in Julia. I just realized that some of the pixels I’m generating have red, green, or blue values outside of the range \[0,1\]. For example, one of my pixels looks like RGB{Floa…

---

## [Makie: heatmap with inset](https://discourse.julialang.org/t/makie-heatmap-with-inset/78372)

<div class="topic-metadata">

**Author:** [@Salmon](https://discourse.julialang.org/u/Salmon)\
**Replies:** 4\
**Last updated:** [March 24, 2022, 11:50am UTC](https://discourse.julialang.org/t/makie-heatmap-with-inset/78372 "2022-03-24T11:50:33Z")

</div>

Hi everyone, I am trying to plot an inset inside of a heatmap and would like a semi-transparent background for the inset to make the line more visible. However, it seems that all “background” attributes (i.e. axis tick…

---

## [Which low latency library for drawing polygon on image + extracting values?](https://discourse.julialang.org/t/which-low-latency-library-for-drawing-polygon-on-image-extracting-values/78291)

<div class="topic-metadata">

**Author:** [@Klaas\_Pauly](https://discourse.julialang.org/u/Klaas_Pauly)\
**Replies:** 0\
**Last updated:** [March 22, 2022, 5:11pm UTC](https://discourse.julialang.org/t/which-low-latency-library-for-drawing-polygon-on-image-extracting-values/78291 "2022-03-22T17:11:16Z")

</div>

I’m looking for a solution similar to R’s clickpoly from spatstat.geom (for those familiar with it). The goal is to let a user draw a polygon on a displayed image (greyscale or heatmap) by clicking the desired vertex poi…

---

## [Call for Plots examples](https://discourse.julialang.org/t/call-for-plots-examples/78206)

<div class="topic-metadata">

**Author:** [@JohnnyChen94](https://discourse.julialang.org/u/JohnnyChen94)\
**Replies:** 0\
**Last updated:** [March 21, 2022, 11:48am UTC](https://discourse.julialang.org/t/call-for-plots-examples/78206 "2022-03-21T11:48:15Z")

</div>

I’m not an experienced Plots user; every time when I use Plots I try to find an example that looks useful and try to modify it. With the help of @BeastyBlacksmith we’ve finally set up the demo gallery using DemoCards.jl,…

---

## [\[Makie, AlgebraOfGraphics\] Multiline title pushed content out of frame](https://discourse.julialang.org/t/makie-algebraofgraphics-multiline-title-pushed-content-out-of-frame/77865)

<div class="topic-metadata">

**Author:** [@TheLateKronos](https://discourse.julialang.org/u/TheLateKronos)\
**Replies:** 1\
**Last updated:** [March 21, 2022, 9:11am UTC](https://discourse.julialang.org/t/makie-algebraofgraphics-multiline-title-pushed-content-out-of-frame/77865 "2022-03-21T09:11:00Z")

</div>

I want a plot with a multiline title. I am plotting via AlgebraOfGraphics.jl. The problem is that the title (set by current\_axis().title = ) pushes content out of frame when it becomes multiline. I also tried adding Labe…

---

## [Is there a way to write a coordinate plane on top of an image?](https://discourse.julialang.org/t/is-there-a-way-to-write-a-coordinate-plane-on-top-of-an-image/77796)

<div class="topic-metadata">

**Author:** [@matic\_lauko](https://discourse.julialang.org/u/matic_lauko)\
**Replies:** 8\
**Last updated:** [March 20, 2022, 7:03am UTC](https://discourse.julialang.org/t/is-there-a-way-to-write-a-coordinate-plane-on-top-of-an-image/77796 "2022-03-20T07:03:57Z")

</div>

Is there a way to write a coordinate plane on an image? And be able to get some coordinates of some points. The second part is not necessary. Thank you.

---

## [Order of legend entries in AlgebraOfGraphics](https://discourse.julialang.org/t/order-of-legend-entries-in-algebraofgraphics/77753)

<div class="topic-metadata">

**Author:** [@Jakob](https://discourse.julialang.org/u/Jakob)\
**Replies:** 11\
**Last updated:** [March 18, 2022, 6:41pm UTC](https://discourse.julialang.org/t/order-of-legend-entries-in-algebraofgraphics/77753 "2022-03-18T18:41:43Z")

</div>

Hi everyone, does anyone know of a way to specify the order of the legend entries created by AlgebraOfGraphics? In the following, the labels get reordered alphabetically but i’d like them to stay in the original order: …

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

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