# Specific Domains

**URL:** https://discourse.julialang.org/c/domain/10.md?no_subcategories=false&page=394

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

**Page:** 395

---

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

---

## [PINN with two boundary conditions](https://discourse.julialang.org/t/pinn-with-two-boundary-conditions/53813)

<div class="topic-metadata">

**Author:** [@Honza9723](https://discourse.julialang.org/u/Honza9723)\
**Replies:** 2\
**Last updated:** [January 23, 2021, 10:54am UTC](https://discourse.julialang.org/t/pinn-with-two-boundary-conditions/53813 "2021-01-23T10:54:12Z")

</div>

Hi, I am working on a physically informed neural network solution of ODE with two boundary conditions. In a standard initial value problem, let’s say y(x) - y’(x) = 0 with y(0) = 1, I would use approximation in a form y…

---

## [Help translating a JAGS model to Turing](https://discourse.julialang.org/t/help-translating-a-jags-model-to-turing/53434)

<div class="topic-metadata">

**Author:** [@drbenvincent](https://discourse.julialang.org/u/drbenvincent)\
**Replies:** 7\
**Last updated:** [January 23, 2021, 10:49am UTC](https://discourse.julialang.org/t/help-translating-a-jags-model-to-turing/53434 "2021-01-23T10:49:03Z")

</div>

I’m a beginner with Turing.jl, and am just trying to get to grips with it by translating some examples from the book Bayesian Cognitive Modelling: a practical course. I’ve had some luck with a number of models, but have …

---

## [Turing: indicator variables vs control flow](https://discourse.julialang.org/t/turing-indicator-variables-vs-control-flow/53539)

<div class="topic-metadata">

**Author:** [@drbenvincent](https://discourse.julialang.org/u/drbenvincent)\
**Replies:** 9\
**Last updated:** [January 23, 2021, 10:44am UTC](https://discourse.julialang.org/t/turing-indicator-variables-vs-control-flow/53539 "2021-01-23T10:44:39Z")

</div>

I have a change point detection model which I’m converting over from JAGS to Turing, and this one is interesting as it raises the question of whether you should use indicator variables (common to other PPL’s) or to use c…

---

## [Performance comparision for equivalent DiffEqFlux models](https://discourse.julialang.org/t/performance-comparision-for-equivalent-diffeqflux-models/53804)

<div class="topic-metadata">

**Author:** [@Kevin\_Kleinbeck](https://discourse.julialang.org/u/Kevin_Kleinbeck)\
**Replies:** 3\
**Last updated:** [January 23, 2021, 7:28am UTC](https://discourse.julialang.org/t/performance-comparision-for-equivalent-diffeqflux-models/53804 "2021-01-23T07:28:19Z")

</div>

Hello, I am considering these 3 ODEs function minimalModelNonAlloc!(D, u, p, t) M = p v = 0.2 .\* ones(length(u)) D .= v - M \* u.^3 - u.^5 return nothing end function minimalModelAlloc(u, p, t) M = p v = 0.2 .\* …

---

## [Minimize Multiple norms using JuMP](https://discourse.julialang.org/t/minimize-multiple-norms-using-jump/53763)

<div class="topic-metadata">

**Author:** [@cheng\_chen](https://discourse.julialang.org/u/cheng_chen)\
**Replies:** 1\
**Last updated:** [January 22, 2021, 9:14pm UTC](https://discourse.julialang.org/t/minimize-multiple-norms-using-jump/53763 "2021-01-22T21:14:08Z")

</div>

Hi, I need to minimize an objective function that has multiple norms in it. Here is a minimal example: A is a variable of dimension d by n. x is a known constant matrix of dimension n by 1 and b\_t (dimension d by 1) …

---

## [Problems to build CPLEX](https://discourse.julialang.org/t/problems-to-build-cplex/53671)

<div class="topic-metadata">

**Author:** [@angeloaliano1](https://discourse.julialang.org/u/angeloaliano1)\
**Replies:** 14\
**Last updated:** [January 22, 2021, 8:43pm UTC](https://discourse.julialang.org/t/problems-to-build-cplex/53671 "2021-01-22T20:43:04Z")

</div>

Dear all, I am having a problem to build the CPLEX v 20.10 on my computer. The error message appears: Pkg.build("CPLEX") Building CPLEX → \`C:\\Users\\Usuário\\.julia\\packages\\CPLEX\\DgohF\\deps\\build.log\` ┌ Error: Error …

---

## [Data Coordinates included in plot (Matlab calls it data tip)](https://discourse.julialang.org/t/data-coordinates-included-in-plot-matlab-calls-it-data-tip/53405)

<div class="topic-metadata">

**Author:** [@Jake](https://discourse.julialang.org/u/Jake)\
**Replies:** 6\
**Last updated:** [January 22, 2021, 6:02pm UTC](https://discourse.julialang.org/t/data-coordinates-included-in-plot-matlab-calls-it-data-tip/53405 "2021-01-22T18:02:33Z")

</div>

I often plot the spectra of the vibration of rotating machines. Here it is critical to know the actual frequency and amplitude of the major sources of vibration. The most convenient way to obtain these values is by plo…

---

## [A thick restarded Lanczos method with deflation/locking?](https://discourse.julialang.org/t/a-thick-restarded-lanczos-method-with-deflation-locking/53788)

<div class="topic-metadata">

**Author:** [@Bruno\_Amorim](https://discourse.julialang.org/u/Bruno_Amorim)\
**Replies:** 0\
**Last updated:** [January 22, 2021, 4:31pm UTC](https://discourse.julialang.org/t/a-thick-restarded-lanczos-method-with-deflation-locking/53788 "2021-01-22T16:31:06Z")

</div>

First some context: In the search for efficient eigensolvers for inner eigenvalues of hermitian matrices, I came across the following papers: \[1512.08135\] A Thick-Restart Lanczos algorithm with polynomial filtering for…

---

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

---

## [Create random numbers into a same array](https://discourse.julialang.org/t/create-random-numbers-into-a-same-array/53766)

<div class="topic-metadata">

**Author:** [@Xijiang\_Yu](https://discourse.julialang.org/u/Xijiang_Yu)\
**Replies:** 2\
**Last updated:** [January 22, 2021, 8:33am UTC](https://discourse.julialang.org/t/create-random-numbers-into-a-same-array/53766 "2021-01-22T08:33:06Z")

</div>

Is there any way to create random numbers into a same array? I am simulating using rand(n) ~1M times, i.e. to determine snp allele to drop into the next generation. This causes a lot of allocations. Or is there some bet…

---

## [ModelingToolkit.jl: ERROR: LoadError: UndefVarError: Sym not defined](https://discourse.julialang.org/t/modelingtoolkit-jl-error-loaderror-undefvarerror-sym-not-defined/53569)

<div class="topic-metadata">

**Author:** [@grheadrick](https://discourse.julialang.org/u/grheadrick)\
**Replies:** 4\
**Last updated:** [January 22, 2021, 2:33am UTC](https://discourse.julialang.org/t/modelingtoolkit-jl-error-loaderror-undefvarerror-sym-not-defined/53569 "2021-01-22T02:33:24Z")

</div>

I’m just getting started with SciML and am looking at ModelingToolkit.jl. The macros work: @variables x y But in docs there is a macro free usage . The above code should also be equivalent to: x = Num(Sym{Float64}(:x)…

---

## [How to make this AFT regression stable?](https://discourse.julialang.org/t/how-to-make-this-aft-regression-stable/53685)

<div class="topic-metadata">

**Author:** [@mkarikom](https://discourse.julialang.org/u/mkarikom)\
**Replies:** 5\
**Last updated:** [January 22, 2021, 1:01am UTC](https://discourse.julialang.org/t/how-to-make-this-aft-regression-stable/53685 "2021-01-22T01:01:00Z")

</div>

I have adapted this excellent post by @aaowens to fit a right-censored AFT regression model, but for some reason the likelihood is not compatible with forwarddiff. using Distributions,Optim function AFT(pvec,data) f…

---

## [Only the explicit Euler method successfully solves my ODE](https://discourse.julialang.org/t/only-the-explicit-euler-method-successfully-solves-my-ode/53704)

<div class="topic-metadata">

**Author:** [@ash](https://discourse.julialang.org/u/ash)\
**Replies:** 8\
**Last updated:** [January 21, 2021, 8:17pm UTC](https://discourse.julialang.org/t/only-the-explicit-euler-method-successfully-solves-my-ode/53704 "2021-01-21T20:17:00Z")

</div>

I realize this is not a very good question due to the nature of the problem, but I have to try since I’ve spent hours debugging this. I am interested in solving a set of ODEs that can be written as follows: using Ellipt…

---

## [Least Squares Minimization of operator norm](https://discourse.julialang.org/t/least-squares-minimization-of-operator-norm/53723)

<div class="topic-metadata">

**Author:** [@cheng\_chen](https://discourse.julialang.org/u/cheng_chen)\
**Replies:** 3\
**Last updated:** [January 21, 2021, 3:24pm UTC](https://discourse.julialang.org/t/least-squares-minimization-of-operator-norm/53723 "2021-01-21T15:24:56Z")

</div>

Here is a minimal example of my problem: I want to find a minimizer x that minimizes the objective function : opnorm(A\*x-b,2)^2 I tried Convex.jl, but it doesn’t work for the operator norm.

---

## [Can anyone tell me what is this distribution?](https://discourse.julialang.org/t/can-anyone-tell-me-what-is-this-distribution/53726)

<div class="topic-metadata">

**Author:** [@abulak](https://discourse.julialang.org/u/abulak)\
**Replies:** 0\
**Last updated:** [January 21, 2021, 2:14pm UTC](https://discourse.julialang.org/t/can-anyone-tell-me-what-is-this-distribution/53726 "2021-01-21T14:14:15Z")

</div>

In my hobby project I arrived at the following problem: I’m given a family of random variables: Wₖ for which I need to estimate cdf: (the above is histogram approximation of pdf from 10^7 samples) From theoretical con…

---

## [Puzzling on a product likelihood using Distributions and Turing](https://discourse.julialang.org/t/puzzling-on-a-product-likelihood-using-distributions-and-turing/52183)

<div class="topic-metadata">

**Author:** [@riegel\_gestr](https://discourse.julialang.org/u/riegel_gestr)\
**Replies:** 2\
**Last updated:** [January 21, 2021, 7:18am UTC](https://discourse.julialang.org/t/puzzling-on-a-product-likelihood-using-distributions-and-turing/52183 "2021-01-21T07:18:47Z")

</div>

I am currently working on a simple bayesian problem in which my likelihood is the product of N poisson distributions, so I got the following: likelihood(x) ~ product\_i(Poisson(mean\_i)) where x is a vector, representing t…

---

## [Access JuMP canonical matricial LP problem](https://discourse.julialang.org/t/access-jump-canonical-matricial-lp-problem/53688)

<div class="topic-metadata">

**Author:** [@josePereiro](https://discourse.julialang.org/u/josePereiro)\
**Replies:** 2\
**Last updated:** [January 21, 2021, 2:28am UTC](https://discourse.julialang.org/t/access-jump-canonical-matricial-lp-problem/53688 "2021-01-21T02:28:05Z")

</div>

Hi, just wondering if there is a way to ‘extract’ the canonical matricial(\*) LP form from a JuMP model. (\*) With canonical form I meant something like: \\text{maximize } c^Tv \\text{, subject to:} \\\\ Sv = b \\\\ lb \\le v …

---

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

---

## [String column dataframe: replace for another string built from a substring from each row](https://discourse.julialang.org/t/string-column-dataframe-replace-for-another-string-built-from-a-substring-from-each-row/53684)

<div class="topic-metadata">

**Author:** [@mocalvao](https://discourse.julialang.org/u/mocalvao)\
**Replies:** 1\
**Last updated:** [January 20, 2021, 8:18pm UTC](https://discourse.julialang.org/t/string-column-dataframe-replace-for-another-string-built-from-a-substring-from-each-row/53684 "2021-01-20T20:18:06Z")

</div>

I have a dataframe of String columns, such as (in fact, it has many more rows and columns): julia\> using DataFrames julia\> df = DataFrame(DRE=\["119018524", "120034962"\], Q1=\["0.50", "0.00"\]) 2×2 DataFrame │ Row │ DRE …

---

## [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.

---

## [Error: Unsatisfiable requirements detected for package MathOptInterface](https://discourse.julialang.org/t/error-unsatisfiable-requirements-detected-for-package-mathoptinterface/46469)

<div class="topic-metadata">

**Author:** [@Raj95](https://discourse.julialang.org/u/Raj95)\
**Replies:** 11\
**Last updated:** [January 20, 2021, 7:18pm UTC](https://discourse.julialang.org/t/error-unsatisfiable-requirements-detected-for-package-mathoptinterface/46469 "2021-01-20T19:18:49Z")

</div>

Hello…I’m getting the following error while trying to add MathOptInterface: Pkg.add("MathOptInterface") ERROR: Unsatisfiable requirements detected for package MathOptInterface \[b8f27783\]: MathOptInterface \[b8f27783\] l…

---

## [Different loss function for training ODE or DDE?](https://discourse.julialang.org/t/different-loss-function-for-training-ode-or-dde/53347)

<div class="topic-metadata">

**Author:** [@Qualium](https://discourse.julialang.org/u/Qualium)\
**Replies:** 5\
**Last updated:** [January 20, 2021, 7:05pm UTC](https://discourse.julialang.org/t/different-loss-function-for-training-ode-or-dde/53347 "2021-01-20T19:05:14Z")

</div>

I am learning to use the DiffEqFlux pkg with the tutorial and playing around and I have a weird problem, I cannot figure it out. In the tutorial they train the model adjusting parameters of the lotka-volterra system so b…

---

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

---

## [Turing error with truncated distribution](https://discourse.julialang.org/t/turing-error-with-truncated-distribution/53418)

<div class="topic-metadata">

**Author:** [@BradGroff](https://discourse.julialang.org/u/BradGroff)\
**Replies:** 1\
**Last updated:** [January 20, 2021, 1:08pm UTC](https://discourse.julialang.org/t/turing-error-with-truncated-distribution/53418 "2021-01-20T13:08:17Z")

</div>

Hi, I’m trying to use a truncated distribution within an @model block of the form data ~ truncated(D(parameter), l, u)). This doesn’t seem to work :frowning: . Here’s the full example: @model function decay\_estimator\_t…

---

## [Failure to run CUDA.jl](https://discourse.julialang.org/t/failure-to-run-cuda-jl/53657)

<div class="topic-metadata">

**Author:** [@Ferran\_Mazzanti](https://discourse.julialang.org/u/Ferran_Mazzanti)\
**Replies:** 3\
**Last updated:** [January 20, 2021, 10:07am UTC](https://discourse.julialang.org/t/failure-to-run-cuda-jl/53657 "2021-01-20T10:07:34Z")

</div>

Hi, I just installed julia 1.5.3 and CUDA.jl in an office computer that runs ubuntu 18.04 and that has old UCDA drivers (from a couple of years ago). I can install CUDA.jl but when I try to use it, if fails to start and…

---

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

[Previous page](https://discourse.julialang.org/c/domain/10.md?no_subcategories=false&page=393)

[Next page](https://discourse.julialang.org/c/domain/10.md?no_subcategories=false&page=395)
