# Specific Domains

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

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

**Page:** 270

---

## [I want a minimal example of plotting data using pure Julia code](https://discourse.julialang.org/t/i-want-a-minimal-example-of-plotting-data-using-pure-julia-code/83435)

<div class="topic-metadata">

**Author:** [@Reza-Reza](https://discourse.julialang.org/u/Reza-Reza)\
**Replies:** 13\
**Last updated:** [June 28, 2022, 10:25pm UTC](https://discourse.julialang.org/t/i-want-a-minimal-example-of-plotting-data-using-pure-julia-code/83435 "2022-06-28T22:25:31Z")

</div>

The library Gadfly is written purely in Julia. I would like to know how using pure Julia someone can plot graphics such as a line or a point. The source code is extensive and I could not find the source code for the pl…

---

## [Saving complex numbers using JSON3](https://discourse.julialang.org/t/saving-complex-numbers-using-json3/83452)

<div class="topic-metadata">

**Author:** [@jlbosse](https://discourse.julialang.org/u/jlbosse)\
**Replies:** 5\
**Last updated:** [June 28, 2022, 7:06pm UTC](https://discourse.julialang.org/t/saving-complex-numbers-using-json3/83452 "2022-06-28T19:06:11Z")

</div>

I am trying to save Complex numbers in json files formatted in a python compatible way as using JSON3 c = 1+5im d = Dict("c" =\> c) jsonstring = JSON3.pretty(d) #= should be { "c" : 1+5j } =# This is how far I got, …

---

## [GeoMakie.jl: Stereographic projection at pole did not work](https://discourse.julialang.org/t/geomakie-jl-stereographic-projection-at-pole-did-not-work/83258)

<div class="topic-metadata">

**Author:** [@JanJereczek](https://discourse.julialang.org/u/JanJereczek)\
**Replies:** 16\
**Last updated:** [June 28, 2022, 6:07pm UTC](https://discourse.julialang.org/t/geomakie-jl-stereographic-projection-at-pole-did-not-work/83258 "2022-06-28T18:07:32Z")

</div>

Hi all, I started to code in Julia half a year ago and I am quite excited about using GeoMakie. I work on ice sheet dynamics so I mostly want to visualize the poles. Therefore I want to use a stereographic projection an…

---

## [Issue with for-loop free model](https://discourse.julialang.org/t/issue-with-for-loop-free-model/83468)

<div class="topic-metadata">

**Author:** [@spragud2](https://discourse.julialang.org/u/spragud2)\
**Replies:** 1\
**Last updated:** [June 28, 2022, 5:08pm UTC](https://discourse.julialang.org/t/issue-with-for-loop-free-model/83468 "2022-06-28T17:08:49Z")

</div>

Hi All, I’m trying to get a simple MLP trained. Pretty much all turing tutorials still use for i in 1:N loops for the likelihood on the data. I’m trying the following: using Flux using Turing,Zygote using MCMCChains …

---

## [Implementing an empircal r-th q-quantile](https://discourse.julialang.org/t/implementing-an-empircal-r-th-q-quantile/83453)

<div class="topic-metadata">

**Author:** [@rikh](https://discourse.julialang.org/u/rikh)\
**Replies:** 1\
**Last updated:** [June 28, 2022, 12:28pm UTC](https://discourse.julialang.org/t/implementing-an-empircal-r-th-q-quantile/83453 "2022-06-28T12:28:55Z")

</div>

I’m trying to implement an algorithm from a paper which makes use of empirical r-th q-quantiles of the marginals X^{(1)}, ..., X^{(p)} for a dataset X with p features (Bénard et al., 2021). If I understand this correctl…

---

## [Plots.jl not showing negative values in 3D](https://discourse.julialang.org/t/plots-jl-not-showing-negative-values-in-3d/83407)

<div class="topic-metadata">

**Author:** [@Siempie](https://discourse.julialang.org/u/Siempie)\
**Replies:** 1\
**Last updated:** [June 28, 2022, 12:14pm UTC](https://discourse.julialang.org/t/plots-jl-not-showing-negative-values-in-3d/83407 "2022-06-28T12:14:12Z")

</div>

I am solving a 3D differential equation. My output data is in the form of a NxNxN dense Matrix for each timestep. With values ranging from -1 to 1. I plan on animating the plot trough time so that leaves 3 dimensions. T…

---

## [Pytorch clamp method in Julia?](https://discourse.julialang.org/t/pytorch-clamp-method-in-julia/83393)

<div class="topic-metadata">

**Author:** [@extremety1989](https://discourse.julialang.org/u/extremety1989)\
**Replies:** 4\
**Last updated:** [June 27, 2022, 4:15pm UTC](https://discourse.julialang.org/t/pytorch-clamp-method-in-julia/83393 "2022-06-27T16:15:55Z")

</div>

torch.clamp\_(out, 0.0, 1.0) in Julia ?

---

## [Morgan Finger print](https://discourse.julialang.org/t/morgan-finger-print/79258)

<div class="topic-metadata">

**Author:** [@YitaoCai](https://discourse.julialang.org/u/YitaoCai)\
**Replies:** 1\
**Last updated:** [June 27, 2022, 3:50pm UTC](https://discourse.julialang.org/t/morgan-finger-print/79258 "2022-06-27T15:50:26Z")

</div>

Is there any package we can get Morgan Finger print same as rdkit’s AllChem.GetMorganFingerprintAsBitVect(mol, radius=3, nBits=fp\_length) Thank you!

---

## [Estimate Empirical CDF using ecdf() on sample](https://discourse.julialang.org/t/estimate-empirical-cdf-using-ecdf-on-sample/83371)

<div class="topic-metadata">

**Author:** [@Max\_Beez](https://discourse.julialang.org/u/Max_Beez)\
**Replies:** 6\
**Last updated:** [June 27, 2022, 12:42pm UTC](https://discourse.julialang.org/t/estimate-empirical-cdf-using-ecdf-on-sample/83371 "2022-06-27T12:42:07Z")

</div>

If I generate a sample of some distribution, for instance of the Exponential distribution then there is no issue using ecdf to plot the Empirical CDF. However, if I apply a function and take a sample I get the error ERR…

---

## [Plots plotlyjs subplots: linking x axis across columns of subplots](https://discourse.julialang.org/t/plots-plotlyjs-subplots-linking-x-axis-across-columns-of-subplots/79122)

<div class="topic-metadata">

**Author:** [@rjgill](https://discourse.julialang.org/u/rjgill)\
**Replies:** 2\
**Last updated:** [June 27, 2022, 8:07am UTC](https://discourse.julialang.org/t/plots-plotlyjs-subplots-linking-x-axis-across-columns-of-subplots/79122 "2022-06-27T08:07:52Z")

</div>

Is it possible to link x-axis across columns of subplots with Julia plots (without linking their y-axis)? using Plots plotlyjs() # or pyplot() plot(rand(100, 2), layout = (1,2), link = :x) If I zoom or pan on one of th…

---

## [Looking for pytorch method alternative in flux](https://discourse.julialang.org/t/looking-for-pytorch-method-alternative-in-flux/83360)

<div class="topic-metadata">

**Author:** [@extremety1989](https://discourse.julialang.org/u/extremety1989)\
**Replies:** 5\
**Last updated:** [June 26, 2022, 4:56pm UTC](https://discourse.julialang.org/t/looking-for-pytorch-method-alternative-in-flux/83360 "2022-06-26T16:56:40Z")

</div>

i am looking for pytorch’s interpolate(out, scale\_factor=2, mode=“nearest”) torch.nn.functional.interpolate — PyTorch 1.12 documentation method alternative in Flux

---

## [How to implement the ANOVA post-hoc test in Julia?](https://discourse.julialang.org/t/how-to-implement-the-anova-post-hoc-test-in-julia/83310)

<div class="topic-metadata">

**Author:** [@Aesth\_Estheticism](https://discourse.julialang.org/u/Aesth_Estheticism)\
**Replies:** 2\
**Last updated:** [June 26, 2022, 3:53pm UTC](https://discourse.julialang.org/t/how-to-implement-the-anova-post-hoc-test-in-julia/83310 "2022-06-26T15:53:33Z")

</div>

I conducted hypothesis test using HypohesisTest package, however, it seems that can’t do post-hoc test. Is there a package could do it?

---

## [Where can I find documentation for instream()](https://discourse.julialang.org/t/where-can-i-find-documentation-for-instream/83355)

<div class="topic-metadata">

**Author:** [@dodoplus](https://discourse.julialang.org/u/dodoplus)\
**Replies:** 3\
**Last updated:** [June 26, 2022, 2:30pm UTC](https://discourse.julialang.org/t/where-can-i-find-documentation-for-instream/83355 "2022-06-26T14:30:36Z")

</div>

It seems that MTK has an instream() operator. I think this is inspired by Modelica’s similarly named operator. Are there any examples using instream()? I could only find a single test using it (in state\_selection.jl). …

---

## [Attempting to reimplement SRGAN from Pytorch to Flux, any help appreciated](https://discourse.julialang.org/t/attempting-to-reimplement-srgan-from-pytorch-to-flux-any-help-appreciated/66869)

<div class="topic-metadata">

**Author:** [@extremety1989](https://discourse.julialang.org/u/extremety1989)\
**Replies:** 4\
**Last updated:** [June 26, 2022, 7:47am UTC](https://discourse.julialang.org/t/attempting-to-reimplement-srgan-from-pytorch-to-flux-any-help-appreciated/66869 "2022-06-26T07:47:42Z")

</div>

Pytorch: class ConvBlock(nn.Module): def \_\_init\_\_( self, in\_channels, out\_channels, discriminator=False, use\_act=True, use\_bn=True, \*\*kwargs, ): su…

---

## [Pullback for both Flux model's inputs and parameters](https://discourse.julialang.org/t/pullback-for-both-flux-models-inputs-and-parameters/83316)

<div class="topic-metadata">

**Author:** [@luciano-drozda](https://discourse.julialang.org/u/luciano-drozda)\
**Replies:** 9\
**Last updated:** [June 26, 2022, 9:08am UTC](https://discourse.julialang.org/t/pullback-for-both-flux-models-inputs-and-parameters/83316 "2022-06-26T09:08:08Z")

</div>

How can I obtain pullback for a Flux model not only w.r.t. its params but also its inputs ? outputs, back = Zygote.pullback( () -\> model(inputs), Flux.params(model) ) returns the adjoint (i.e., back) for the model para…

---

## [Parameter estimation with ODEProblem/Turing error](https://discourse.julialang.org/t/parameter-estimation-with-odeproblem-turing-error/83281)

<div class="topic-metadata">

**Author:** [@jae0](https://discourse.julialang.org/u/jae0)\
**Replies:** 2\
**Last updated:** [June 25, 2022, 6:29pm UTC](https://discourse.julialang.org/t/parameter-estimation-with-odeproblem-turing-error/83281 "2022-06-25T18:29:11Z")

</div>

Hi, Trying to do parameter estimation and running into an error that I am not finding from a web search: type or paste code hereERROR: MethodError: no method matching translate!!(::Core.SSAValue, ::Tuple{Symbol, Symbol}…

---

## [Right way of applying \`inverse\_transform\`](https://discourse.julialang.org/t/right-way-of-applying-inverse-transform/83124)

<div class="topic-metadata">

**Author:** [@ctrebbau](https://discourse.julialang.org/u/ctrebbau)\
**Replies:** 3\
**Last updated:** [June 25, 2022, 6:27pm UTC](https://discourse.julialang.org/t/right-way-of-applying-inverse-transform/83124 "2022-06-25T18:27:18Z")

</div>

Hi, I have a setup like this: dftrain, dftest = partition(df, 0.7, shuffle=true, rng=123) datapipe = ContinuousEncoder() |\> Standardizer() datatrans\_mach = machine(datapipe, dftrain) |\> fit! normalized\_train = MLJ.tran…

---

## [(Flux) certain arbitrary model sizes and random seeds make gradients exactly zero](https://discourse.julialang.org/t/flux-certain-arbitrary-model-sizes-and-random-seeds-make-gradients-exactly-zero/83277)

<div class="topic-metadata">

**Author:** [@evanfields](https://discourse.julialang.org/u/evanfields)\
**Replies:** 3\
**Last updated:** [June 25, 2022, 1:25pm UTC](https://discourse.julialang.org/t/flux-certain-arbitrary-model-sizes-and-random-seeds-make-gradients-exactly-zero/83277 "2022-06-25T13:25:59Z")

</div>

I’m building a small neural network to predict a one-dimensional output from 5 input features. Simplified reproducing example: function build\_model(mid\_layer\_size, seed) Random.seed!(seed) return Chain( …

---

## [Simultaneous training of multiple neural networks with Lux](https://discourse.julialang.org/t/simultaneous-training-of-multiple-neural-networks-with-lux/83255)

<div class="topic-metadata">

**Author:** [@bkuwahara](https://discourse.julialang.org/u/bkuwahara)\
**Replies:** 5\
**Last updated:** [June 25, 2022, 7:51am UTC](https://discourse.julialang.org/t/simultaneous-training-of-multiple-neural-networks-with-lux/83255 "2022-06-25T07:51:35Z")

</div>

Suppose I’m trying to train a neural ODE composed of two distinct neural networks, for instance because I want to preserve information about which model states influence which other states. This worked easily with the o…

---

## [Loss function with symbolic selection of variable parameters](https://discourse.julialang.org/t/loss-function-with-symbolic-selection-of-variable-parameters/64289)

<div class="topic-metadata">

**Author:** [@lamorton](https://discourse.julialang.org/u/lamorton)\
**Replies:** 2\
**Last updated:** [June 24, 2022, 11:26pm UTC](https://discourse.julialang.org/t/loss-function-with-symbolic-selection-of-variable-parameters/64289 "2022-06-24T23:26:57Z")

</div>

I’m trying to create a loss function with a reduced set of adjustable parameters. I’m using LabelledArrays to keep track of the parameters using symbolic names. What I’d like is to be able to say “hold this set of parame…

---

## [Multi-dimensional array of tuples](https://discourse.julialang.org/t/multi-dimensional-array-of-tuples/83288)

<div class="topic-metadata">

**Author:** [@pqdmac](https://discourse.julialang.org/u/pqdmac)\
**Replies:** 2\
**Last updated:** [June 24, 2022, 7:26pm UTC](https://discourse.julialang.org/t/multi-dimensional-array-of-tuples/83288 "2022-06-24T19:26:30Z")

</div>

I am working in an combinatorial optimization problem (multiple vehicle routing with profits) where I have a binary variable x\[i,j,p\] representing an edge (i,j) traversed by a vehicle p. I would like to get a p-dimens…

---

## [Opacity in violinplot with AlgebraOfGraphics](https://discourse.julialang.org/t/opacity-in-violinplot-with-algebraofgraphics/83254)

<div class="topic-metadata">

**Author:** [@lauswullum](https://discourse.julialang.org/u/lauswullum)\
**Replies:** 2\
**Last updated:** [June 24, 2022, 5:06pm UTC](https://discourse.julialang.org/t/opacity-in-violinplot-with-algebraofgraphics/83254 "2022-06-24T17:06:36Z")

</div>

Hi, I want to combine box plots and violin plots in Algebra of Graphics. But I cannot set an alpha value in the visual function, when using a violin plot. MWE: using CairoMakie using AlgebraOfGraphics using DataFrames …

---

## [Question on BilevelJuMP model concise formulation](https://discourse.julialang.org/t/question-on-bileveljump-model-concise-formulation/82988)

<div class="topic-metadata">

**Author:** [@math\_opt](https://discourse.julialang.org/u/math_opt)\
**Replies:** 5\
**Last updated:** [June 24, 2022, 3:46pm UTC](https://discourse.julialang.org/t/question-on-bileveljump-model-concise-formulation/82988 "2022-06-24T15:46:12Z")

</div>

I am trying to break a BilevelJuMP model into smaller functions (similar to what is recommended for a JuMP model when working with complex problems). My question is whether the models written below are all interpreted as…

---

## [What's the kernel used in Geom.density for kernel density estimate in Gadfly?](https://discourse.julialang.org/t/whats-the-kernel-used-in-geom-density-for-kernel-density-estimate-in-gadfly/83275)

<div class="topic-metadata">

**Author:** [@guixien](https://discourse.julialang.org/u/guixien)\
**Replies:** 1\
**Last updated:** [June 24, 2022, 1:15pm UTC](https://discourse.julialang.org/t/whats-the-kernel-used-in-geom-density-for-kernel-density-estimate-in-gadfly/83275 "2022-06-24T13:15:44Z")

</div>

I am not seeing this anywhere in the documentation. Is it simply the Gaussian kernel?

---

## [Problem with DataInspector](https://discourse.julialang.org/t/problem-with-datainspector/82958)

<div class="topic-metadata">

**Author:** [@tt1234567](https://discourse.julialang.org/u/tt1234567)\
**Replies:** 4\
**Last updated:** [June 24, 2022, 12:04pm UTC](https://discourse.julialang.org/t/problem-with-datainspector/82958 "2022-06-24T12:04:03Z")

</div>

DataInspector no longer works for me after the recent Makie update: heatmap(rand(100,100)) DataInspector() gives ERROR: type Array has no field extents Stacktrace: \[1\] getproperty @ .\\Base.jl:42 \[inlined\] \[2\] Bbo…

---

## [Advice on optimizing large SDP model generation with JuMP + ComplexOptInterface](https://discourse.julialang.org/t/advice-on-optimizing-large-sdp-model-generation-with-jump-complexoptinterface/82629)

<div class="topic-metadata">

**Author:** [@cgois](https://discourse.julialang.org/u/cgois)\
**Replies:** 6\
**Last updated:** [June 24, 2022, 11:03am UTC](https://discourse.julialang.org/t/advice-on-optimizing-large-sdp-model-generation-with-jump-complexoptinterface/82629 "2022-06-24T11:03:18Z")

</div>

I am implementing a somewhat large SDP with complex-valued variables in JuMP, using ComplexOptInterface. For small test cases, it seems to work, but my real interest is in larger instances (specifically, when sn \> 1 and n…

---

## [Why is the threaded version of this so much slower than the serial and distributed versions?](https://discourse.julialang.org/t/why-is-the-threaded-version-of-this-so-much-slower-than-the-serial-and-distributed-versions/83280)

<div class="topic-metadata">

**Author:** [@ElOceanografo](https://discourse.julialang.org/u/ElOceanografo)\
**Replies:** 2\
**Last updated:** [June 23, 2022, 10:23pm UTC](https://discourse.julialang.org/t/why-is-the-threaded-version-of-this-so-much-slower-than-the-serial-and-distributed-versions/83280 "2022-06-23T22:23:39Z")

</div>

Minimal example of my problem: using ThreadsX using Statistics data = \[randn(1000) for i in 1:100, j in 1:200\] f(x) = mean(x) # warmup f(data\[1, 2\]) t\_serial = @elapsed map(f, data) t\_thread = @elapsed ThreadsX.map(…

---

## [Adding objective to JuMP model changes feasibility?](https://discourse.julialang.org/t/adding-objective-to-jump-model-changes-feasibility/83200)

<div class="topic-metadata">

**Author:** [@mhar](https://discourse.julialang.org/u/mhar)\
**Replies:** 4\
**Last updated:** [June 23, 2022, 6:58pm UTC](https://discourse.julialang.org/t/adding-objective-to-jump-model-changes-feasibility/83200 "2022-06-23T18:58:49Z")

</div>

I have written a function that is supposed to output whether the problem is feasible and the Gram matrix. using DynamicPolynomials using JuMP using MosekTools using SumOfSquares @polyvar var1 var2 """ get\_max\_log\_de…

---

## [Question: how to get dot products from size(x, n) matrix and length(n) vector](https://discourse.julialang.org/t/question-how-to-get-dot-products-from-size-x-n-matrix-and-length-n-vector/83257)

<div class="topic-metadata">

**Author:** [@bwanab](https://discourse.julialang.org/u/bwanab)\
**Replies:** 3\
**Last updated:** [June 23, 2022, 6:50pm UTC](https://discourse.julialang.org/t/question-how-to-get-dot-products-from-size-x-n-matrix-and-length-n-vector/83257 "2022-06-23T18:50:11Z")

</div>

Matrix: X2, Vector: w2 What I’m trying to do is get the vector of dot products from each row of the matrix with the vector. The best I’ve come up with so far is: sum(X2 .\* w2', dims=1) This works, but I have this n…

---

## [Turing probability queries always return 1](https://discourse.julialang.org/t/turing-probability-queries-always-return-1/83269)

<div class="topic-metadata">

**Author:** [@cmhainje](https://discourse.julialang.org/u/cmhainje)\
**Replies:** 0\
**Last updated:** [June 23, 2022, 6:49pm UTC](https://discourse.julialang.org/t/turing-probability-queries-always-return-1/83269 "2022-06-23T18:49:24Z")

</div>

I made a probabilistic model that attempts to infer the center coordinates (h, k) and radius (R) of a circle given a number of points that were sampled from the circle, but when I try to query probabilities, I always get…

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

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