# Specific Domains

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

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

**Page:** 214

---

## [Dash.jl 3D plot combining line and surface](https://discourse.julialang.org/t/dash-jl-3d-plot-combining-line-and-surface/94918)

<div class="topic-metadata">

**Author:** [@Maucejo](https://discourse.julialang.org/u/Maucejo)\
**Replies:** 6\
**Last updated:** [February 21, 2023, 2:58pm UTC](https://discourse.julialang.org/t/dash-jl-3d-plot-combining-line-and-surface/94918 "2023-02-21T14:58:29Z")

</div>

Hi all, I am trying to develop a Dash app containing a 3d plot. This plot includes a 3d line and a 3d plane surface. The MWE below gives you a basic overview of the app. using PlotlyJS using Dash, DashBootstrapComponent…

---

## [GLMakie change SliderGrid on Menu](https://discourse.julialang.org/t/glmakie-change-slidergrid-on-menu/94914)

<div class="topic-metadata">

**Author:** [@vandenman](https://discourse.julialang.org/u/vandenman)\
**Replies:** 4\
**Last updated:** [February 21, 2023, 9:35am UTC](https://discourse.julialang.org/t/glmakie-change-slidergrid-on-menu/94914 "2023-02-21T09:35:01Z")

</div>

I’m trying to create a small interactive plot/ dashboard to showcase different network models during a presentation. My goal is to have a menu in the top left to select a model, a series of sliders below it to adjust the…

---

## [Reinit! dynamicalsystems.jl](https://discourse.julialang.org/t/reinit-dynamicalsystems-jl/94620)

<div class="topic-metadata">

**Author:** [@Sergey\_Novak](https://discourse.julialang.org/u/Sergey_Novak)\
**Replies:** 4\
**Last updated:** [February 21, 2023, 6:01am UTC](https://discourse.julialang.org/t/reinit-dynamicalsystems-jl/94620 "2023-02-21T06:01:37Z")

</div>

Hello, I want to write code for an orbit diagram for a continuous system with a detailed setting, and I have a questions. Where can i find source code for function \_poincaresos from produce\_orbit diagram.jl? How do I bu…

---

## [Implementation of self-attention in Transformers.jl?](https://discourse.julialang.org/t/implementation-of-self-attention-in-transformers-jl/94732)

<div class="topic-metadata">

**Author:** [@rkube](https://discourse.julialang.org/u/rkube)\
**Replies:** 9\
**Last updated:** [February 21, 2023, 4:51am UTC](https://discourse.julialang.org/t/implementation-of-self-attention-in-transformers-jl/94732 "2023-02-21T04:51:03Z")

</div>

Hi, I’m following this tutorial on implementing transformer architectures and have a question on how to best implement a self-attention block. My current code for a single attention head looks like this: # Self-attent…

---

## [How to apply an activation function to a subset of output units?](https://discourse.julialang.org/t/how-to-apply-an-activation-function-to-a-subset-of-output-units/33202)

<div class="topic-metadata">

**Author:** [@johnbb](https://discourse.julialang.org/u/johnbb)\
**Replies:** 4\
**Last updated:** [February 21, 2023, 12:34am UTC](https://discourse.julialang.org/t/how-to-apply-an-activation-function-to-a-subset-of-output-units/33202 "2023-02-21T00:34:19Z")

</div>

Using Flux I would like to apply an activation function to all but the first output unit. More precisely, I would like to constrain all but the first unit to be non-negative. How can I achieve that? Thanks.

---

## [Not fast enough backward pass on transformer model](https://discourse.julialang.org/t/not-fast-enough-backward-pass-on-transformer-model/94735)

<div class="topic-metadata">

**Author:** [@reachtarunhere](https://discourse.julialang.org/u/reachtarunhere)\
**Replies:** 5\
**Last updated:** [February 21, 2023, 12:25am UTC](https://discourse.julialang.org/t/not-fast-enough-backward-pass-on-transformer-model/94735 "2023-02-21T00:25:07Z")

</div>

I have implemented a basic transformer like model and have a reference version in PyTorch 2.0 (which does a few extra ops like masking but not less work basically) I am getting comparable performance in the forward pass …

---

## [JuMP(+Juniper) Error registering user-defined function](https://discourse.julialang.org/t/jump-juniper-error-registering-user-defined-function/94909)

<div class="topic-metadata">

**Author:** [@PrimulaBunce](https://discourse.julialang.org/u/PrimulaBunce)\
**Replies:** 2\
**Last updated:** [February 20, 2023, 7:46pm UTC](https://discourse.julialang.org/t/jump-juniper-error-registering-user-defined-function/94909 "2023-02-20T19:46:36Z")

</div>

Hi, I’m trying to register a user-defined function in JuMP and get the following error: ERROR: Unable to register the function :f\_objective. Common reasons for this include: \* The function takes \`f(x::Vector)\` as in…

---

## [Symbolics.jl: Why doesn't a matrix multiplied by its inverse simplify to the identity?](https://discourse.julialang.org/t/symbolics-jl-why-doesnt-a-matrix-multiplied-by-its-inverse-simplify-to-the-identity/65978)

<div class="topic-metadata">

**Author:** [@garrek](https://discourse.julialang.org/u/garrek)\
**Replies:** 3\
**Last updated:** [February 20, 2023, 7:16pm UTC](https://discourse.julialang.org/t/symbolics-jl-why-doesnt-a-matrix-multiplied-by-its-inverse-simplify-to-the-identity/65978 "2023-02-20T19:16:36Z")

</div>

Expected behavior: Using simplify in the Symbolics.jl package, return the identity for the operation A^-1 \* A for a square matrix involving multiplication of trigonometric functions in the matrix elements (assuming det(A…

---

## [Optimization.jl and constraints](https://discourse.julialang.org/t/optimization-jl-and-constraints/94519)

<div class="topic-metadata">

**Author:** [@ChauhanT](https://discourse.julialang.org/u/ChauhanT)\
**Replies:** 19\
**Last updated:** [February 20, 2023, 9:24am UTC](https://discourse.julialang.org/t/optimization-jl-and-constraints/94519 "2023-02-20T09:24:50Z")

</div>

Hi, I have an optimisation problem which I solve with Optimization.jl using IPNewton(). In order to reduce the space of solutions to a more physically reasonable set, I want to introduce some constraints. I do this usin…

---

## [What does lp and crank refer to in the prediction](https://discourse.julialang.org/t/what-does-lp-and-crank-refer-to-in-the-prediction/94233)

<div class="topic-metadata">

**Author:** [@Nobel\_Chowdary](https://discourse.julialang.org/u/Nobel_Chowdary)\
**Replies:** 1\
**Last updated:** [February 20, 2023, 6:59am UTC](https://discourse.julialang.org/t/what-does-lp-and-crank-refer-to-in-the-prediction/94233 "2023-02-20T06:59:44Z")

</div>

---

## [Efficiency of MOI.CountBelongs](https://discourse.julialang.org/t/efficiency-of-moi-countbelongs/94819)

<div class="topic-metadata">

**Author:** [@Stuart\_Rogers](https://discourse.julialang.org/u/Stuart_Rogers)\
**Replies:** 3\
**Last updated:** [February 20, 2023, 1:03am UTC](https://discourse.julialang.org/t/efficiency-of-moi-countbelongs/94819 "2023-02-20T01:03:54Z")

</div>

In the JuMP code below, I want to count the number of occurrences of each possible integer in the variable matrix M. s is defined to be a Kx1 variable vector equal to M\[:\]. Is there any difference in efficiency between @…

---

## [Slicing a sparse variable created from list of tuples](https://discourse.julialang.org/t/slicing-a-sparse-variable-created-from-list-of-tuples/94853)

<div class="topic-metadata">

**Author:** [@felipecordera](https://discourse.julialang.org/u/felipecordera)\
**Replies:** 1\
**Last updated:** [February 19, 2023, 9:16pm UTC](https://discourse.julialang.org/t/slicing-a-sparse-variable-created-from-list-of-tuples/94853 "2023-02-19T21:16:20Z")

</div>

Hi everyone, I would like to do slicing on a sparse variable created from a list of tuples. In the next example (extracted from documentation), the same variable is created in two different ways. While it is possible t…

---

## [JuMP SCIP error](https://discourse.julialang.org/t/jump-scip-error/93958)

<div class="topic-metadata">

**Author:** [@Stuart\_Rogers](https://discourse.julialang.org/u/Stuart_Rogers)\
**Replies:** 8\
**Last updated:** [February 19, 2023, 9:12pm UTC](https://discourse.julialang.org/t/jump-scip-error/93958 "2023-02-19T21:12:36Z")

</div>

I get the error below when I try to solve a model in JuMP using SCIP. There is no error if I instead use HiGHS. $ julia Oscar.jl ERROR: LoadError: MathOptInterface.DeleteNotAllowed{MathOptInterface.VariableIndex}: Delet…

---

## [Julia bindings for Z3 SMT solver](https://discourse.julialang.org/t/julia-bindings-for-z3-smt-solver/38218)

<div class="topic-metadata">

**Author:** [@XVilka](https://discourse.julialang.org/u/XVilka)\
**Replies:** 20\
**Last updated:** [February 19, 2023, 4:46pm UTC](https://discourse.julialang.org/t/julia-bindings-for-z3-smt-solver/38218 "2023-02-19T16:46:00Z")

</div>

Recently I met the need to access Z3 from Julia program, searched a bit and found abandoned Julia bindings at zenna/Z3.jl. But they do not work with the recent versions and I asked Z3 developers themselves. As it turned …

---

## [JuMP function result\_count returns 1 when infinite solutions possible, which solver to use?](https://discourse.julialang.org/t/jump-function-result-count-returns-1-when-infinite-solutions-possible-which-solver-to-use/94880)

<div class="topic-metadata">

**Author:** [@Patrik](https://discourse.julialang.org/u/Patrik)\
**Replies:** 2\
**Last updated:** [February 19, 2023, 4:40pm UTC](https://discourse.julialang.org/t/jump-function-result-count-returns-1-when-infinite-solutions-possible-which-solver-to-use/94880 "2023-02-19T16:40:46Z")

</div>

Consider the following model of a simple LP problem: using JuMP, HiGHS m = Model(HiGHS.Optimizer) @variable(m, x1 \>= 0) @variable(m, x2 \<= 0) @objective(m, Max, 2x1-x2) @constraint(m, c1, 8x1-4x2\<=16) @constraint…

---

## [Nearest point in a convex hull](https://discourse.julialang.org/t/nearest-point-in-a-convex-hull/94849)

<div class="topic-metadata">

**Author:** [@fratrik](https://discourse.julialang.org/u/fratrik)\
**Replies:** 6\
**Last updated:** [February 19, 2023, 2:41pm UTC](https://discourse.julialang.org/t/nearest-point-in-a-convex-hull/94849 "2023-02-19T14:41:37Z")

</div>

Background: I’m using ScatteredInterpolation to approximate a higher-order value function as needed. The interpolation works reasonably well for points that are in some sense “inside” prior points that I’ve used. My pl…

---

## [AoG free scale facet](https://discourse.julialang.org/t/aog-free-scale-facet/94858)

<div class="topic-metadata">

**Author:** [@aelmokadem](https://discourse.julialang.org/u/aelmokadem)\
**Replies:** 2\
**Last updated:** [February 19, 2023, 2:06pm UTC](https://discourse.julialang.org/t/aog-free-scale-facet/94858 "2023-02-19T14:06:08Z")

</div>

Hi, I am trying to facet a AoG plot using layout and wanted to set the scales free for the facetted plot similar to ggplot2 scales = "free" option. Any thoughts?! Thanks, Ahmed.

---

## [Bug when training a custom model using Flux](https://discourse.julialang.org/t/bug-when-training-a-custom-model-using-flux/94440)

<div class="topic-metadata">

**Author:** [@PokeLu](https://discourse.julialang.org/u/PokeLu)\
**Replies:** 2\
**Last updated:** [February 18, 2023, 8:41pm UTC](https://discourse.julialang.org/t/bug-when-training-a-custom-model-using-flux/94440 "2023-02-18T20:41:57Z")

</div>

Hello, I am pretty new to Julia and Flux. I am trying to build a simple neural network but using an attention layer. I wrote the code as follows, which works fine in the inference(feed-forward) mode: using Flux struct…

---

## [Missing reference - JuMP variables](https://discourse.julialang.org/t/missing-reference-jump-variables/94865)

<div class="topic-metadata">

**Author:** [@kevinqiao](https://discourse.julialang.org/u/kevinqiao)\
**Replies:** 3\
**Last updated:** [February 19, 2023, 7:08am UTC](https://discourse.julialang.org/t/missing-reference-jump-variables/94865 "2023-02-19T07:08:55Z")

</div>

I’m using JuMP in vscode, and I add JuMP as using JuMP at the beginning of my code, and I define many variables like @variable(hNet, injectionTemp\[1:SCHTIME\]) @variable(hNet, inletTemp\[1:nNode, 1:SCHTIME\]) … while…

---

## [Leftjoin changes the type of my dataframe columns from Float64 to Float64?](https://discourse.julialang.org/t/leftjoin-changes-the-type-of-my-dataframe-columns-from-float64-to-float64/94839)

<div class="topic-metadata">

**Author:** [@dlshew19](https://discourse.julialang.org/u/dlshew19)\
**Replies:** 1\
**Last updated:** [February 18, 2023, 4:51pm UTC](https://discourse.julialang.org/t/leftjoin-changes-the-type-of-my-dataframe-columns-from-float64-to-float64/94839 "2023-02-18T16:51:26Z")

</div>

I have a dataframe where the output is this: Row │ TeamName OffTOPct OffRPct OffFTRate │ String31 Float64 Float64 Float64 ─────┼───────────────────────────────────────────────── 1 │ Abilene C…

---

## [How to control legend position with PGFPlotsX (move legend outside of axis)](https://discourse.julialang.org/t/how-to-control-legend-position-with-pgfplotsx-move-legend-outside-of-axis/94832)

<div class="topic-metadata">

**Author:** [@Ahmed\_Salih](https://discourse.julialang.org/u/Ahmed_Salih)\
**Replies:** 2\
**Last updated:** [February 18, 2023, 3:48pm UTC](https://discourse.julialang.org/t/how-to-control-legend-position-with-pgfplotsx-move-legend-outside-of-axis/94832 "2023-02-18T15:48:35Z")

</div>

I was advised to not “hijack” a thread, whatever that means, so making one more post. Using PGFPlotsX, there is a field entry, legend\_pos, which allows for moving the legend inside of the axis. How can I move the legen…

---

## [How to set iteration limit in JuMP by using KNITRO solver](https://discourse.julialang.org/t/how-to-set-iteration-limit-in-jump-by-using-knitro-solver/94822)

<div class="topic-metadata">

**Author:** [@kevinqiao](https://discourse.julialang.org/u/kevinqiao)\
**Replies:** 1\
**Last updated:** [February 18, 2023, 12:18pm UTC](https://discourse.julialang.org/t/how-to-set-iteration-limit-in-jump-by-using-knitro-solver/94822 "2023-02-18T12:18:17Z")

</div>

I use KNITRO as a nonlinear solver in JuMP, and the iteration is limited to 1e4, I want to set a new iteration limit, how to do it? And a function that can obtain the supported attributes in JuMP could be preferred, is …

---

## [How to control legend position with PGFPlotsX](https://discourse.julialang.org/t/how-to-control-legend-position-with-pgfplotsx/14018)

<div class="topic-metadata">

**Author:** [@PetrKryslUCSD](https://discourse.julialang.org/u/PetrKryslUCSD)\
**Replies:** 10\
**Last updated:** [February 18, 2023, 11:53am UTC](https://discourse.julialang.org/t/how-to-control-legend-position-with-pgfplotsx/14018 "2023-02-18T11:53:18Z")

</div>

If I do @pgf p = Axis({ xlabel = "Distance \[m\]", ylabel = "Temperature \[degree Kelvin\]", title = "", legend = "pos south east" }, …

---

## [How do I change font and font size in PGFPlotsX?](https://discourse.julialang.org/t/how-do-i-change-font-and-font-size-in-pgfplotsx/94830)

<div class="topic-metadata">

**Author:** [@Ahmed\_Salih](https://discourse.julialang.org/u/Ahmed_Salih)\
**Replies:** 0\
**Last updated:** [February 18, 2023, 11:21am UTC](https://discourse.julialang.org/t/how-do-i-change-font-and-font-size-in-pgfplotsx/94830 "2023-02-18T11:21:12Z")

</div>

Hello! I am trying to change the font size in this example: x = range(0; stop =2\*pi, length = 100) @pgf GroupPlot( { group\_style = { group\_size="2 by 1", xticklabels\_at="edge…

---

## [How do I add a group title to PGFPlotsX?](https://discourse.julialang.org/t/how-do-i-add-a-group-title-to-pgfplotsx/94828)

<div class="topic-metadata">

**Author:** [@Ahmed\_Salih](https://discourse.julialang.org/u/Ahmed_Salih)\
**Replies:** 0\
**Last updated:** [February 18, 2023, 10:41am UTC](https://discourse.julialang.org/t/how-do-i-add-a-group-title-to-pgfplotsx/94828 "2023-02-18T10:41:16Z")

</div>

Hello! Suppose I have the code from the doc, https://kristofferc.github.io/PGFPlotsX.jl/stable/examples/axislike/: x = range(0; stop =2\*pi, length = 100) @pgf GroupPlot( { group\_style = { …

---

## [Box-constrained optimization calls values outside of the box](https://discourse.julialang.org/t/box-constrained-optimization-calls-values-outside-of-the-box/94810)

<div class="topic-metadata">

**Author:** [@bclyons12](https://discourse.julialang.org/u/bclyons12)\
**Replies:** 1\
**Last updated:** [February 18, 2023, 7:09am UTC](https://discourse.julialang.org/t/box-constrained-optimization-calls-values-outside-of-the-box/94810 "2023-02-18T07:09:09Z")

</div>

I’m trying to use Optim.jl to minimize a function that has hard boundaries on the input using the Fminbox box-constrained optimization. When the minimum value is near or on the boundary, however, the optimizer can check …

---

## [How to set axis limits in 3D plots](https://discourse.julialang.org/t/how-to-set-axis-limits-in-3d-plots/94813)

<div class="topic-metadata">

**Author:** [@math\_opt](https://discourse.julialang.org/u/math_opt)\
**Replies:** 1\
**Last updated:** [February 18, 2023, 5:45am UTC](https://discourse.julialang.org/t/how-to-set-axis-limits-in-3d-plots/94813 "2023-02-18T05:45:45Z")

</div>

For the code below, how do I set the axis limits to be same for all axes: using CairoMakie temp = \[15 21 18 17; 15 12 11 18; 20 20 20 22\] fig, axis, plot = scatter(temp\[1,:\], temp\[2,:\], temp\[3,:\]) xlabel!(axis.scene, "d…

---

## [Implementing Cuthill-McKee](https://discourse.julialang.org/t/implementing-cuthill-mckee/9268)

<div class="topic-metadata">

**Author:** [@Juser](https://discourse.julialang.org/u/Juser)\
**Replies:** 31\
**Last updated:** [February 18, 2023, 4:17am UTC](https://discourse.julialang.org/t/implementing-cuthill-mckee/9268 "2023-02-18T04:17:40Z")

</div>

I am trying to implement Cuthill McKee on a number of large, sparse matrices. In particular, I would like to get the mapping from original row order to post-CM (or post-reverseCM) row order. The only package that I can …

---

## [This example in CUDA.jl does not work for me?](https://discourse.julialang.org/t/this-example-in-cuda-jl-does-not-work-for-me/94294)

<div class="topic-metadata">

**Author:** [@Ahmed\_Salih](https://discourse.julialang.org/u/Ahmed_Salih)\
**Replies:** 5\
**Last updated:** [February 17, 2023, 11:23pm UTC](https://discourse.julialang.org/t/this-example-in-cuda-jl-does-not-work-for-me/94294 "2023-02-17T23:23:12Z")

</div>

https://cuda.juliagpu.org/stable/api/kernel/#Element-access-and-broadcasting using Test using CUDA a = rand(Float16, (16, 16)) b = rand(Float16, (16, 16)) c = rand(Float32, (16, 16)) a\_dev = CuArray(a) b\_…

---

## [Makie markercolor magic](https://discourse.julialang.org/t/makie-markercolor-magic/94760)

<div class="topic-metadata">

**Author:** [@dfarmer](https://discourse.julialang.org/u/dfarmer)\
**Replies:** 1\
**Last updated:** [February 17, 2023, 3:50pm UTC](https://discourse.julialang.org/t/makie-markercolor-magic/94760 "2023-02-17T15:50:00Z")

</div>

I’m fishing a little here, but yesterday I loaded up a bunch of data in a StructArray and made a scatterline plot scatterlines(field1, markercolor = field2) and it worked and I couldn’t believe how awesome everything was…

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

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