# Latest

**URL:** https://discourse.julialang.org/latest.md?page=830

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

**Page:** 831

---

## [How to make graphplot do the same layout every invocation](https://discourse.julialang.org/t/how-to-make-graphplot-do-the-same-layout-every-invocation/92024)

<div class="topic-metadata">

**Author:** [@brianguenter](https://discourse.julialang.org/u/brianguenter)\
**Replies:** 0\
**Last updated:** [December 22, 2022, 11:01pm UTC](https://discourse.julialang.org/t/how-to-make-graphplot-do-the-same-layout-every-invocation/92024 "2022-12-22T23:01:57Z")

</div>

I am using graphplot from GraphRecipes.jl to draw expression trees. The best layout option is :tree but unfortunately the layout changes every time graphplot is called, even if the arguments are exactly the same. Below…

---

## [Use of save\_idxs solver option with MethodOfLines/ModelingToolkit](https://discourse.julialang.org/t/use-of-save-idxs-solver-option-with-methodoflines-modelingtoolkit/92023)

<div class="topic-metadata">

**Author:** [@johnb](https://discourse.julialang.org/u/johnb)\
**Replies:** 2\
**Last updated:** [December 22, 2022, 10:54pm UTC](https://discourse.julialang.org/t/use-of-save-idxs-solver-option-with-methodoflines-modelingtoolkit/92023 "2022-12-22T22:54:08Z")

</div>

I’m trying to use save\_idxs to facilitate parameter fitting and while I’ve figured out that my solution needs to be accessed after solving as: sol.u\[var1(x,t)\]\[idx1,idx2\] I’m having trouble figuring out how to use the …

---

## [Solving the diffusion equation in Julia](https://discourse.julialang.org/t/solving-the-diffusion-equation-in-julia/28811)

<div class="topic-metadata">

**Author:** [@linwaytin](https://discourse.julialang.org/u/linwaytin)\
**Replies:** 23\
**Last updated:** [December 22, 2022, 10:53pm UTC](https://discourse.julialang.org/t/solving-the-diffusion-equation-in-julia/28811 "2022-12-22T22:53:59Z")

</div>

I’m learning how to solve PDEs numerically. The code I wrote in Julia 1.2.0 is as follows: using PyCall so = pyimport("scipy.optimize") using PyPlot I = im h\_s = 0.1 h\_t = 0.02 T = 100.0 L\_x = 30.0 L\_y = 30.0 ddx(u…

---

## [Where is the input column name information in a dataframe transformation?](https://discourse.julialang.org/t/where-is-the-input-column-name-information-in-a-dataframe-transformation/91973)

<div class="topic-metadata">

**Author:** [@rocco\_sprmnt21](https://discourse.julialang.org/u/rocco_sprmnt21)\
**Replies:** 9\
**Last updated:** [December 22, 2022, 9:01pm UTC](https://discourse.julialang.org/t/where-is-the-input-column-name-information-in-a-dataframe-transformation/91973 "2022-12-22T21:01:45Z")

</div>

suppose I want to use some specific columns of a dataframe to do some operations and output another number of columns. In dynamically defining the name of these columns I want to use the name of the source columns. In …

---

## [Compiling Gtk UI app with PackageCompiler](https://discourse.julialang.org/t/compiling-gtk-ui-app-with-packagecompiler/92022)

<div class="topic-metadata">

**Author:** [@sschmidhuber](https://discourse.julialang.org/u/sschmidhuber)\
**Replies:** 0\
**Last updated:** [December 22, 2022, 9:00pm UTC](https://discourse.julialang.org/t/compiling-gtk-ui-app-with-packagecompiler/92022 "2022-12-22T21:00:44Z")

</div>

Hello all, I wrote a little desktop application with a Gtk frontend, it works fine in general, just the start up time is long. After that it works nicely. Also I would like to run it on machines without an Julia environ…

---

## [Effectively replace a key in a dictionary](https://discourse.julialang.org/t/effectively-replace-a-key-in-a-dictionary/92018)

<div class="topic-metadata">

**Author:** [@andrey2185](https://discourse.julialang.org/u/andrey2185)\
**Replies:** 2\
**Last updated:** [December 22, 2022, 7:20pm UTC](https://discourse.julialang.org/t/effectively-replace-a-key-in-a-dictionary/92018 "2022-12-22T19:20:51Z")

</div>

Hello, please tell me a way to effectively replace a key in a dictionary, or a package that implements a data structure that allows you to do this, due to a fixed number of key-value pairs i have too many allocations, i…

---

## [Error when connecting to Pluto on localhost](https://discourse.julialang.org/t/error-when-connecting-to-pluto-on-localhost/88187)

<div class="topic-metadata">

**Author:** [@Soraen](https://discourse.julialang.org/u/Soraen)\
**Replies:** 6\
**Last updated:** [December 22, 2022, 7:03pm UTC](https://discourse.julialang.org/t/error-when-connecting-to-pluto-on-localhost/88187 "2022-12-22T19:03:04Z")

</div>

Hello all, I recently started using Julia and Pluto notebook, everything went well until I had to restart my MacBook Pro, and since then I’ve been unable to connect to Pluto on local host. When I run call Pluto.run(), i…

---

## [How to @opt\_out rules defined with RuleConfig in Zygote](https://discourse.julialang.org/t/how-to-opt-out-rules-defined-with-ruleconfig-in-zygote/92014)

<div class="topic-metadata">

**Author:** [@tansongchen](https://discourse.julialang.org/u/tansongchen)\
**Replies:** 0\
**Last updated:** [December 22, 2022, 6:29pm UTC](https://discourse.julialang.org/t/how-to-opt-out-rules-defined-with-ruleconfig-in-zygote/92014 "2022-12-22T18:29:16Z")

</div>

Let’s say I have a type WeirdNumber \<: Number is so weird that I don’t want its derivative of power function (^) be calculated by rrule of ^ and literal\_pow, and should instead go through and differentiate its definition…

---

## [Convert data from txt file to matrix](https://discourse.julialang.org/t/convert-data-from-txt-file-to-matrix/91481)

<div class="topic-metadata">

**Author:** [@Sergey\_Novak](https://discourse.julialang.org/u/Sergey_Novak)\
**Replies:** 18\
**Last updated:** [December 22, 2022, 5:52pm UTC](https://discourse.julialang.org/t/convert-data-from-txt-file-to-matrix/91481 "2022-12-22T17:52:12Z")

</div>

Hello, I have txt file the following format It three column with numbers. How can i read data from file and convert him to matrix \[N1, N2, 1\] where N1 length first column, N2 length second column and 1 is the number t…

---

## [Io error handling examples?](https://discourse.julialang.org/t/io-error-handling-examples/92009)

<div class="topic-metadata">

**Author:** [@1153dent](https://discourse.julialang.org/u/1153dent)\
**Replies:** 1\
**Last updated:** [December 22, 2022, 5:44pm UTC](https://discourse.julialang.org/t/io-error-handling-examples/92009 "2022-12-22T17:44:19Z")

</div>

Hi there just had an event that highlit how being lazy will get you every time. I have working code BUT no real error handling in the IO component. I was wondering if there is a example or example(s) anywhere which sho…

---

## [How does chatGPT work?](https://discourse.julialang.org/t/how-does-chatgpt-work/91652)

<div class="topic-metadata">

**Author:** [@DNF](https://discourse.julialang.org/u/DNF)\
**Replies:** 12\
**Last updated:** [December 22, 2022, 5:10pm UTC](https://discourse.julialang.org/t/how-does-chatgpt-work/91652 "2022-12-22T17:10:56Z")

</div>

I wonder how this actually works. ChatGPT wrote some pretty amazing Matlab code for me, though with some syntax errors (missing multiplication signs, etc.) which it fixed when I mentioned it. It also used some undefined…

---

## [Fallback Constructor for All Subtypes](https://discourse.julialang.org/t/fallback-constructor-for-all-subtypes/92011)

<div class="topic-metadata">

**Author:** [@mrufsvold](https://discourse.julialang.org/u/mrufsvold)\
**Replies:** 1\
**Last updated:** [December 22, 2022, 4:59pm UTC](https://discourse.julialang.org/t/fallback-constructor-for-all-subtypes/92011 "2022-12-22T16:59:02Z")

</div>

I have a series of structs that are all subtypes of the same abstract type. They can all be constructed with the same logic, but I’d like to have unique constructor names. abstract type AbstractThing end struct Thing1 \<…

---

## [Use or not functions in JuMP](https://discourse.julialang.org/t/use-or-not-functions-in-jump/92003)

<div class="topic-metadata">

**Author:** [@lara](https://discourse.julialang.org/u/lara)\
**Replies:** 1\
**Last updated:** [December 22, 2022, 4:45pm UTC](https://discourse.julialang.org/t/use-or-not-functions-in-jump/92003 "2022-12-22T16:45:13Z")

</div>

Hey, guys. This is my first time working with both Julia and JuMP. It has been an adventure (and a lot of mistakes). Right now I accomplished to do the base code to work as I need and I am trying to put it inside the J…

---

## [ChatGPT weighs in on the Julia vs Python debate](https://discourse.julialang.org/t/chatgpt-weighs-in-on-the-julia-vs-python-debate/91986)

<div class="topic-metadata">

**Author:** [@xiaodai](https://discourse.julialang.org/u/xiaodai)\
**Replies:** 1\
**Last updated:** [December 22, 2022, 3:29pm UTC](https://discourse.julialang.org/t/chatgpt-weighs-in-on-the-julia-vs-python-debate/91986 "2022-12-22T15:29:54Z")

</div>

---

## [Using parameters inside a function](https://discourse.julialang.org/t/using-parameters-inside-a-function/92004)

<div class="topic-metadata">

**Author:** [@dgagnon](https://discourse.julialang.org/u/dgagnon)\
**Replies:** 4\
**Last updated:** [December 22, 2022, 2:51pm UTC](https://discourse.julialang.org/t/using-parameters-inside-a-function/92004 "2022-12-22T14:51:58Z")

</div>

Hello I want to use a function using parameters.jl. Inside REPL I simply type: julia\> called\_function(param1=4, param2=0) The function “called\_function” has other parameters but those have default values which are goo…

---

## [Create plot layout with no separation between plots](https://discourse.julialang.org/t/create-plot-layout-with-no-separation-between-plots/91976)

<div class="topic-metadata">

**Author:** [@Pablo\_Marchant](https://discourse.julialang.org/u/Pablo_Marchant)\
**Replies:** 3\
**Last updated:** [December 22, 2022, 1:32pm UTC](https://discourse.julialang.org/t/create-plot-layout-with-no-separation-between-plots/91976 "2022-12-22T13:32:12Z")

</div>

Hi all, I’m currently trying to use Plots to produce a figure with two panels and no distance between panels. Essentially in the following example: using Plots p1 = plot(rand(10),rand(10),xformatter=Returns("")) p2 = …

---

## [BSplineKit Spline Derivative](https://discourse.julialang.org/t/bsplinekit-spline-derivative/91961)

<div class="topic-metadata">

**Author:** [@ziolai](https://discourse.julialang.org/u/ziolai)\
**Replies:** 5\
**Last updated:** [December 22, 2022, 1:08pm UTC](https://discourse.julialang.org/t/bsplinekit-spline-derivative/91961 "2022-12-22T13:08:34Z")

</div>

BSplineKit has in Library =\> Data Interpolation =\> Functions, the example xs = -1:0.1:1; ys = cospi.(xs); S = interpolate(xs, ys, BSplineOrder(4)) (Derivative(1) \* S)(-1) For me, this example fails with no method ma…

---

## [MeshViz/Makie is smoothing my colors](https://discourse.julialang.org/t/meshviz-makie-is-smoothing-my-colors/91993)

<div class="topic-metadata">

**Author:** [@\_stla](https://discourse.julialang.org/u/_stla)\
**Replies:** 3\
**Last updated:** [December 22, 2022, 11:23am UTC](https://discourse.julialang.org/t/meshviz-makie-is-smoothing-my-colors/91993 "2022-12-22T11:23:10Z")

</div>

Hello, I have a mesh of a torus, made with Meshes.jl. I assigned colors to the vertices in order to have a checkerboard texture: Nice but the mesh is not smooth, one can see the facets. I found that one can get the …

---

## [How to plot heat maps with grid lines in \`Plots.jl\` with \`GR\` as backend?](https://discourse.julialang.org/t/how-to-plot-heat-maps-with-grid-lines-in-plots-jl-with-gr-as-backend/91996)

<div class="topic-metadata">

**Author:** [@singularitti](https://discourse.julialang.org/u/singularitti)\
**Replies:** 1\
**Last updated:** [December 22, 2022, 10:30am UTC](https://discourse.julialang.org/t/how-to-plot-heat-maps-with-grid-lines-in-plots-jl-with-gr-as-backend/91996 "2022-12-22T10:30:11Z")

</div>

For example, the following code will produce a heat map: using Plots heatmap(rand(4, 4)) How do I add the grid lines between each of the squares? The option grid = true does not work.

---

## [Maximal value - product of two lists](https://discourse.julialang.org/t/maximal-value-product-of-two-lists/91972)

<div class="topic-metadata">

**Author:** [@baprata](https://discourse.julialang.org/u/baprata)\
**Replies:** 6\
**Last updated:** [December 22, 2022, 10:41am UTC](https://discourse.julialang.org/t/maximal-value-product-of-two-lists/91972 "2022-12-22T10:41:33Z")

</div>

Concerning the following situation: max \\forall i { h\_i \* X\_{mij} } Is there a function to obtain the maximal value between the product of two lists?

---

## [How to Fill Area between 3 Functions / Curves?](https://discourse.julialang.org/t/how-to-fill-area-between-3-functions-curves/91954)

<div class="topic-metadata">

**Author:** [@Freya\_the\_Goddess](https://discourse.julialang.org/u/Freya_the_Goddess)\
**Replies:** 4\
**Last updated:** [December 22, 2022, 10:18am UTC](https://discourse.julialang.org/t/how-to-fill-area-between-3-functions-curves/91954 "2022-12-22T10:18:49Z")

</div>

Hi all, it is more than 2 curves problem now, I want to fill an area / region between 3 curves. Currently I can only manage to fill area between 2 curves: using Plots, LaTeXStrings, Roots, SymPy gr() x = collect(ra…

---

## [Export dataframe to html file](https://discourse.julialang.org/t/export-dataframe-to-html-file/91941)

<div class="topic-metadata">

**Author:** [@mocalvao](https://discourse.julialang.org/u/mocalvao)\
**Replies:** 6\
**Last updated:** [December 22, 2022, 8:08am UTC](https://discourse.julialang.org/t/export-dataframe-to-html-file/91941 "2022-12-22T08:08:01Z")

</div>

Hi there I have read a csv file into Julia, as a dataframe, with some columns of type string, some of type integer, and others of type float. I would like to save, or export or write this dataframe as an html file. What…

---

## [Using IJulia](https://discourse.julialang.org/t/using-ijulia/91962)

<div class="topic-metadata">

**Author:** [@FH96](https://discourse.julialang.org/u/FH96)\
**Replies:** 3\
**Last updated:** [December 22, 2022, 6:21am UTC](https://discourse.julialang.org/t/using-ijulia/91962 "2022-12-22T06:21:32Z")

</div>

Hi everyone! I am new to Jupyter notebook. I installed IJulia and tried to run notebook(), I face this : “install Jupyter via Conda, y/n? \[y\]:” I waited for a while, like 30 minutes, but julia keeps evaluating and no…

---

## [Experiment: NamedTuple Syntax w/ Type Declarations](https://discourse.julialang.org/t/experiment-namedtuple-syntax-w-type-declarations/91988)

<div class="topic-metadata">

**Author:** [@uniment](https://discourse.julialang.org/u/uniment)\
**Replies:** 3\
**Last updated:** [December 22, 2022, 3:27am UTC](https://discourse.julialang.org/t/experiment-namedtuple-syntax-w-type-declarations/91988 "2022-12-22T03:27:57Z")

</div>

We have builtin syntax sugar for declaring NamedTuples like so: julia\> a, b, c, d = 1, 2, 3, 4 (1, 2, 3, 4) julia\> (; a=1, b=2, c, d) (a = 1, b = 2, c = 3, d = 4) However, if we wish to declare types (e.g. :a as Numbe…

---

## [How to define a struct programmatically?](https://discourse.julialang.org/t/how-to-define-a-struct-programmatically/58621)

<div class="topic-metadata">

**Author:** [@tomtom](https://discourse.julialang.org/u/tomtom)\
**Replies:** 10\
**Last updated:** [April 5, 2021, 6:12pm UTC](https://discourse.julialang.org/t/how-to-define-a-struct-programmatically/58621 "2021-04-05T18:12:49Z")

</div>

suppose I have parametric struct Mystruct{N} where N depends on the contents of data. Now, I need a “super-struct” that contains variable numbers of of Mystructs, e.g. depends on data I may need: struct Superstruct{N1,…

---

## [How to Approach Parameter Estimation with Non-Linear Optimizers](https://discourse.julialang.org/t/how-to-approach-parameter-estimation-with-non-linear-optimizers/91985)

<div class="topic-metadata">

**Author:** [@ejmeitz](https://discourse.julialang.org/u/ejmeitz)\
**Replies:** 3\
**Last updated:** [December 21, 2022, 11:25pm UTC](https://discourse.julialang.org/t/how-to-approach-parameter-estimation-with-non-linear-optimizers/91985 "2022-12-21T23:25:12Z")

</div>

Hello, I am trying to estimate the parameters of an ODE given discrete data x(t) that is the solution to that ODE. The ODE is: m\\ddot{x}=f(x,\\theta) where \\theta is some vector of parameters. I can estimate the paramete…

---

## [How to get non-trivial solution with SDP in SCS?](https://discourse.julialang.org/t/how-to-get-non-trivial-solution-with-sdp-in-scs/91896)

<div class="topic-metadata">

**Author:** [@ivzktch99](https://discourse.julialang.org/u/ivzktch99)\
**Replies:** 9\
**Last updated:** [December 21, 2022, 9:53pm UTC](https://discourse.julialang.org/t/how-to-get-non-trivial-solution-with-sdp-in-scs/91896 "2022-12-21T21:53:29Z")

</div>

I am trying to solve the following, but I want to find the nonzero solution (right now it returns only trivial solutions). Is there anyway to do that? Basically I want to find matrix G (symmetric and PSD) and matrix D (…

---

## [ReverseDiff method error in multiplication](https://discourse.julialang.org/t/reversediff-method-error-in-multiplication/91758)

<div class="topic-metadata">

**Author:** [@slwu89](https://discourse.julialang.org/u/slwu89)\
**Replies:** 1\
**Last updated:** [December 21, 2022, 8:49pm UTC](https://discourse.julialang.org/t/reversediff-method-error-in-multiplication/91758 "2022-12-21T20:49:21Z")

</div>

Hi all, I have a question about a method error in ReverseDiff.jl, which arises in my function when calling \* (line p/g + p\*(a-am) in my MWE below), and using ReverseDiff to calculate the Hessian matrix. I’ve checked tha…

---

## [Pass arguments to struct constructor](https://discourse.julialang.org/t/pass-arguments-to-struct-constructor/91968)

<div class="topic-metadata">

**Author:** [@PatrickMcFarlane](https://discourse.julialang.org/u/PatrickMcFarlane)\
**Replies:** 1\
**Last updated:** [December 21, 2022, 4:59pm UTC](https://discourse.julialang.org/t/pass-arguments-to-struct-constructor/91968 "2022-12-21T16:59:06Z")

</div>

Hello, I am working on code for an economic model. The solutions to the model are stored in arrays within an immutable struct. The dimensions of those arrays are drawn from another struct that holds hyperparameters fo…

---

## [Construct a JuMP model from smaller models](https://discourse.julialang.org/t/construct-a-jump-model-from-smaller-models/91929)

<div class="topic-metadata">

**Author:** [@Betristor](https://discourse.julialang.org/u/Betristor)\
**Replies:** 4\
**Last updated:** [December 21, 2022, 8:18pm UTC](https://discourse.julialang.org/t/construct-a-jump-model-from-smaller-models/91929 "2022-12-21T20:18:52Z")

</div>

Hey guys, I’m quite curious about the JuMP model object. Once I construct a JuMP model where all variables and expressions are organized into one model instance which goes through many scripts and it worked. It could be …

[Previous page](https://discourse.julialang.org/latest.md?page=829)

[Next page](https://discourse.julialang.org/latest.md?page=831)
