# Latest

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

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

**Page:** 829

---

## [Precompiling Plots Keeps Occuring Whenever I use Plots](https://discourse.julialang.org/t/precompiling-plots-keeps-occuring-whenever-i-use-plots/92031)

<div class="topic-metadata">

**Author:** [@Freya\_the\_Goddess](https://discourse.julialang.org/u/Freya_the_Goddess)\
**Replies:** 2\
**Last updated:** [December 26, 2022, 10:20am UTC](https://discourse.julialang.org/t/precompiling-plots-keeps-occuring-whenever-i-use-plots/92031 "2022-12-26T10:20:39Z")

</div>

Why there is Precompiling Plots now whenever I use Plots? It wasn’t like this before(2 months ago), so it takes longer to show the plot.

---

## [Get the argument names of an function](https://discourse.julialang.org/t/get-the-argument-names-of-an-function/32902)

<div class="topic-metadata">

**Author:** [@Elmer\_Cusipuma](https://discourse.julialang.org/u/Elmer_Cusipuma)\
**Replies:** 6\
**Last updated:** [December 26, 2022, 10:15am UTC](https://discourse.julialang.org/t/get-the-argument-names-of-an-function/32902 "2022-12-26T10:15:18Z")

</div>

For an arbitrary function function f(x,y,z=3) p = x+y\*z return p end I want to be able take the argument names of f julia\> argument\_names(f) 3-element Array{Symbol,1}: :x :y :z Is this possible?

---

## [How to create a new shapefile containing a few points](https://discourse.julialang.org/t/how-to-create-a-new-shapefile-containing-a-few-points/43454)

<div class="topic-metadata">

**Author:** [@rio](https://discourse.julialang.org/u/rio)\
**Replies:** 19\
**Last updated:** [December 26, 2022, 9:15am UTC](https://discourse.julialang.org/t/how-to-create-a-new-shapefile-containing-a-few-points/43454 "2022-12-26T09:15:32Z")

</div>

Hi, I have the latitude and longitude of a few points (in WGS84, EPS 4326) and I would like to save my points in a Esri shapefile. My 5 points have coordinates like Lon = -44 .+ rand(5); Lat = -23 .+ rand(5) Please,…

---

## [Color plot with a list](https://discourse.julialang.org/t/color-plot-with-a-list/91835)

<div class="topic-metadata">

**Author:** [@saba](https://discourse.julialang.org/u/saba)\
**Replies:** 6\
**Last updated:** [December 26, 2022, 7:08am UTC](https://discourse.julialang.org/t/color-plot-with-a-list/91835 "2022-12-26T07:08:11Z")

</div>

Hi I have a big list which contains some other lists. It’s for example like this A=\[ \[1,2,3\] , \[4,5,6\] , \[7,8,9\] \]. How can I plot a heatmap for this? or any other types of colormaps. My actual list information: typeo…

---

## [Makie: is it possible to draw major and minor ticks on all four axes?](https://discourse.julialang.org/t/makie-is-it-possible-to-draw-major-and-minor-ticks-on-all-four-axes/66911)

<div class="topic-metadata">

**Author:** [@liuyxpp](https://discourse.julialang.org/u/liuyxpp)\
**Replies:** 9\
**Last updated:** [December 26, 2022, 2:20am UTC](https://discourse.julialang.org/t/makie-is-it-possible-to-draw-major-and-minor-ticks-on-all-four-axes/66911 "2022-12-26T02:20:01Z")

</div>

I can not find the solution from the doc. Note that I do not mean twin axes. I just want to pair the ticks for left and right axes, and bottom and top axes, respectively. Thanks!

---

## [Happy Holidays with GameZero](https://discourse.julialang.org/t/happy-holidays-with-gamezero/92108)

<div class="topic-metadata">

**Author:** [@avik](https://discourse.julialang.org/u/avik)\
**Replies:** 3\
**Last updated:** [December 25, 2022, 8:48pm UTC](https://discourse.julialang.org/t/happy-holidays-with-gamezero/92108 "2022-12-25T20:48:17Z")

</div>

To celebrate the holiday season, I thought it would be fun to create a winter themed game using GameZero.jl. It’s a very simple card matching game, in a little over 200 lines of julia. Try it out from here: https://githu…

---

## [Design a parameterized wave speed function](https://discourse.julialang.org/t/design-a-parameterized-wave-speed-function/92111)

<div class="topic-metadata">

**Author:** [@gladisor](https://discourse.julialang.org/u/gladisor)\
**Replies:** 0\
**Last updated:** [December 25, 2022, 7:57pm UTC](https://discourse.julialang.org/t/design-a-parameterized-wave-speed-function/92111 "2022-12-25T19:57:26Z")

</div>

Hello SciML community, I am a new user of some of the packages in this ecosystem in search of some guidance of how to efficiently write code which models the behavior of acoustic waves in two dimensions. So far I have c…

---

## [Translating a TuringGLM model to a Turing model](https://discourse.julialang.org/t/translating-a-turingglm-model-to-a-turing-model/91818)

<div class="topic-metadata">

**Author:** [@PeetoomHeida](https://discourse.julialang.org/u/PeetoomHeida)\
**Replies:** 4\
**Last updated:** [December 25, 2022, 7:31pm UTC](https://discourse.julialang.org/t/translating-a-turingglm-model-to-a-turing-model/91818 "2022-12-25T19:31:59Z")

</div>

I am trying to implement a hierarchical model, and am running into issues getting the model to return the parameters I used to generate a test data set. When I implement the model using TuringGLM I get the parameters I e…

---

## [Vectorization over subset of indices](https://discourse.julialang.org/t/vectorization-over-subset-of-indices/92097)

<div class="topic-metadata">

**Author:** [@erlebach](https://discourse.julialang.org/u/erlebach)\
**Replies:** 8\
**Last updated:** [December 25, 2022, 7:30pm UTC](https://discourse.julialang.org/t/vectorization-over-subset-of-indices/92097 "2022-12-25T19:30:22Z")

</div>

I would like to vectorize some operation such as a .= b .+ c but only a subset of indices. For example, if they are both 4D arrays, I would like to vectorize only over dimensions 1 and 3. Is this possible,perhaps with…

---

## [\[ANN\] Harbest.jl - Simple web scraping with Julia](https://discourse.julialang.org/t/ann-harbest-jl-simple-web-scraping-with-julia/91821)

<div class="topic-metadata">

**Author:** [@Jose\_Diaz](https://discourse.julialang.org/u/Jose_Diaz)\
**Replies:** 5\
**Last updated:** [December 25, 2022, 7:06pm UTC](https://discourse.julialang.org/t/ann-harbest-jl-simple-web-scraping-with-julia/91821 "2022-12-25T19:06:20Z")

</div>

Hello people! I’m making a package, mostly as a personal tool but I just publish it. It’s kind of a port of Rvest from R, but it will extend the functionality way more, making new and cool functions. Currently, I see …

---

## [No version info in "Oh My Posh" with juliaup](https://discourse.julialang.org/t/no-version-info-in-oh-my-posh-with-juliaup/91713)

<div class="topic-metadata">

**Author:** [@Mo-Gul](https://discourse.julialang.org/u/Mo-Gul)\
**Replies:** 1\
**Last updated:** [December 25, 2022, 6:36pm UTC](https://discourse.julialang.org/t/no-version-info-in-oh-my-posh-with-juliaup/91713 "2022-12-25T18:36:50Z")

</div>

When installing Julia with the regular installer on Windows I receive a correct version info in an “Oh My Posh” segment when being in an “Julia folder”. But installing Julia via juliaup the same directory now states “err…

---

## [Digression on short variable names](https://discourse.julialang.org/t/digression-on-short-variable-names/91859)

<div class="topic-metadata">

**Author:** [@DNF](https://discourse.julialang.org/u/DNF)\
**Replies:** 33\
**Last updated:** [December 25, 2022, 6:21pm UTC](https://discourse.julialang.org/t/digression-on-short-variable-names/91859 "2022-12-25T18:21:52Z")

</div>

One gripe, perhaps my pet peeve: long variable names make code hard to read. It’s a wall of text with numerous very similar long names. And for a casual reader, the names carry no information. It’s just hard to follow t…

---

## [Bug in CUDA, CuArray, or something I just don't know?](https://discourse.julialang.org/t/bug-in-cuda-cuarray-or-something-i-just-dont-know/92059)

<div class="topic-metadata">

**Author:** [@Ahmed\_Salih](https://discourse.julialang.org/u/Ahmed_Salih)\
**Replies:** 3\
**Last updated:** [December 25, 2022, 12:03pm UTC](https://discourse.julialang.org/t/bug-in-cuda-cuarray-or-something-i-just-dont-know/92059 "2022-12-25T12:03:33Z")

</div>

Hello! When I run this code to convert a vector of ints into a CuArray, I see something extremely weird… julia\> ListOfInts = collect(1:1\*10^6) 1000000-element Vector{Int64}: 1 2 3 4 5…

---

## [How to Create a Ring Torus with Plots? (I have the code with GLMakie and gnuplot package that need more perfectioning)](https://discourse.julialang.org/t/how-to-create-a-ring-torus-with-plots-i-have-the-code-with-glmakie-and-gnuplot-package-that-need-more-perfectioning/92103)

<div class="topic-metadata">

**Author:** [@Freya\_the\_Goddess](https://discourse.julialang.org/u/Freya_the_Goddess)\
**Replies:** 2\
**Last updated:** [December 25, 2022, 11:04am UTC](https://discourse.julialang.org/t/how-to-create-a-ring-torus-with-plots-i-have-the-code-with-glmakie-and-gnuplot-package-that-need-more-perfectioning/92103 "2022-12-25T11:04:52Z")

</div>

Hi all, I want to create 3-dimensional torus like this: With GLMakie or Plots, because I want to add annotations, and then I can see which is x,y,z axis I get the code from Lazarus’ website using Gnuplot let U …

---

## [How to Transform Plots / Shape with Plots.jl](https://discourse.julialang.org/t/how-to-transform-plots-shape-with-plots-jl/92079)

<div class="topic-metadata">

**Author:** [@Freya\_the\_Goddess](https://discourse.julialang.org/u/Freya_the_Goddess)\
**Replies:** 7\
**Last updated:** [December 25, 2022, 11:02am UTC](https://discourse.julialang.org/t/how-to-transform-plots-shape-with-plots-jl/92079 "2022-12-25T11:02:47Z")

</div>

Hi all, I want to transform the shape that I plot with this code: using Plots, LaTeXStrings, Roots, SymPy gr() f(x) = sin(x^2) + cos(2x) - 6 g(x) = sin(x^2) + cos(2x) plot(f,2,4, ylims=(-8,3), legend=:topleft, li…

---

## [Best practices to reduce startup time for CUDA.jl?](https://discourse.julialang.org/t/best-practices-to-reduce-startup-time-for-cuda-jl/92102)

<div class="topic-metadata">

**Author:** [@parthe](https://discourse.julialang.org/u/parthe)\
**Replies:** 2\
**Last updated:** [December 25, 2022, 9:54am UTC](https://discourse.julialang.org/t/best-practices-to-reduce-startup-time-for-cuda-jl/92102 "2022-12-25T09:54:47Z")

</div>

Github Discussion Hi, I am looking for best practices to load the CUDA.jl package and the first usage of methods such as CUDA.randn from this package. I am running CUDA.jl on a cluster node. I am not sure if I am usin…

---

## [Using vector of vectors for initial guess in TwoPointBVProblem](https://discourse.julialang.org/t/using-vector-of-vectors-for-initial-guess-in-twopointbvproblem/88362)

<div class="topic-metadata">

**Author:** [@morningglory05](https://discourse.julialang.org/u/morningglory05)\
**Replies:** 5\
**Last updated:** [December 25, 2022, 7:39am UTC](https://discourse.julialang.org/t/using-vector-of-vectors-for-initial-guess-in-twopointbvproblem/88362 "2022-12-25T07:39:41Z")

</div>

Hello! I am trying to run a bvp to obtain a periodic orbit. A forward integration IVP works with the current parameters, but there is an instability that causes problems with different parameters. This can be solved by u…

---

## [Mutating versus non-mutating arrays for Zygote Gradient](https://discourse.julialang.org/t/mutating-versus-non-mutating-arrays-for-zygote-gradient/92095)

<div class="topic-metadata">

**Author:** [@erlebach](https://discourse.julialang.org/u/erlebach)\
**Replies:** 6\
**Last updated:** [December 25, 2022, 2:57am UTC](https://discourse.julialang.org/t/mutating-versus-non-mutating-arrays-for-zygote-gradient/92095 "2022-12-25T02:57:09Z")

</div>

I created a custom Lux layer to evaluate a polynomial. Now, I have N point entering the layer, transformed, and input into a loss function. I created a loop to evaluate the polynomial since I do not understand broadcasti…

---

## [Declaring ForwardDiff tag directly with a DifferentialEquations integrator / nested function](https://discourse.julialang.org/t/declaring-forwarddiff-tag-directly-with-a-differentialequations-integrator-nested-function/83766)

<div class="topic-metadata">

**Author:** [@DanielVandH](https://discourse.julialang.org/u/DanielVandH)\
**Replies:** 3\
**Last updated:** [December 24, 2022, 11:30pm UTC](https://discourse.julialang.org/t/declaring-forwarddiff-tag-directly-with-a-differentialequations-integrator-nested-function/83766 "2022-12-24T23:30:13Z")

</div>

This is a continuation of an original question of mine (Updating integrator parameter/initial condition with ForwardDiff.Dual types) to be more focused on the actual problem of defining an array/scalar for use with autom…

---

## [Help with implementing a toy model using continuous space](https://discourse.julialang.org/t/help-with-implementing-a-toy-model-using-continuous-space/92092)

<div class="topic-metadata">

**Author:** [@CosmicSpittle](https://discourse.julialang.org/u/CosmicSpittle)\
**Replies:** 6\
**Last updated:** [December 24, 2022, 11:21pm UTC](https://discourse.julialang.org/t/help-with-implementing-a-toy-model-using-continuous-space/92092 "2022-12-24T23:21:47Z")

</div>

Hello everyone! I’m new to Julia so apologies if I couldn’t figure out to make this more minimal. This is a simple continuous space where a few dolphins (agents with type dolphin) get randomly positioned and at each m…

---

## [Building a custom Layer in Lux.jl](https://discourse.julialang.org/t/building-a-custom-layer-in-lux-jl/92091)

<div class="topic-metadata">

**Author:** [@erlebach](https://discourse.julialang.org/u/erlebach)\
**Replies:** 10\
**Last updated:** [December 24, 2022, 11:03pm UTC](https://discourse.julialang.org/t/building-a-custom-layer-in-lux-jl/92091 "2022-12-24T23:03:25Z")

</div>

I am constructing a custom layer, and have an error: ERROR: MethodError: no method matching iterate(::Type{Vector{Float32}}) Closest candidates are: iterate(::Union{LinRange, StepRangeLen}) at range.jl:872 iterate(:…

---

## [Would it be possible to implement Jax-style reverse mode AD in Julia?](https://discourse.julialang.org/t/would-it-be-possible-to-implement-jax-style-reverse-mode-ad-in-julia/92065)

<div class="topic-metadata">

**Author:** [@benjamin-macadam](https://discourse.julialang.org/u/benjamin-macadam)\
**Replies:** 5\
**Last updated:** [December 24, 2022, 9:59pm UTC](https://discourse.julialang.org/t/would-it-be-possible-to-implement-jax-style-reverse-mode-ad-in-julia/92065 "2022-12-24T21:59:26Z")

</div>

I’ve spent a fair bit of time moving between Jax and Julia over the last year. One thing that has stuck out to me is that the AD libraries in Julia work in a fundamentally different way than Jax. As far as I can tell, th…

---

## [Adding Flexibility/Storage to Matpower case files in PowerModel](https://discourse.julialang.org/t/adding-flexibility-storage-to-matpower-case-files-in-powermodel/92067)

<div class="topic-metadata">

**Author:** [@Wahee01](https://discourse.julialang.org/u/Wahee01)\
**Replies:** 3\
**Last updated:** [December 24, 2022, 9:48pm UTC](https://discourse.julialang.org/t/adding-flexibility-storage-to-matpower-case-files-in-powermodel/92067 "2022-12-24T21:48:13Z")

</div>

Hello, I’m attempting to add flexibility/battery to several nodes in the Matpower IEEE9 bus case file. With this method “% hours mpc.time\_elapsed = 1.0 %% storage data % storage\_bus ps qs energy energy\_rating cha…

---

## [Training a neural network within method of lines and ODE solve framework](https://discourse.julialang.org/t/training-a-neural-network-within-method-of-lines-and-ode-solve-framework/86293)

<div class="topic-metadata">

**Author:** [@kaido975](https://discourse.julialang.org/u/kaido975)\
**Replies:** 3\
**Last updated:** [December 24, 2022, 6:15pm UTC](https://discourse.julialang.org/t/training-a-neural-network-within-method-of-lines-and-ode-solve-framework/86293 "2022-12-24T18:15:02Z")

</div>

I am trying to train a neural network which is a part of a PDE, I am solving the PDE with MOL and ODE solve. Below is the forward pass i.e getting the solution with ODE solve which runs fine. import ModelingToolkit: Int…

---

## [Parametrized types](https://discourse.julialang.org/t/parametrized-types/92090)

<div class="topic-metadata">

**Author:** [@erlebach](https://discourse.julialang.org/u/erlebach)\
**Replies:** 3\
**Last updated:** [December 24, 2022, 3:56pm UTC](https://discourse.julialang.org/t/parametrized-types/92090 "2022-12-24T15:56:07Z")

</div>

I am looking at the source code to Lux.jl layers, and see the following struct for the Dense layer: struct Dense{use\_bias, F1, F2, F3} \<: AbstractExplicitLayer activation::F1 in\_dims::Int out\_dims::Int i…

---

## [Dispatch on a set of value type parameters](https://discourse.julialang.org/t/dispatch-on-a-set-of-value-type-parameters/91864)

<div class="topic-metadata">

**Author:** [@nsajko](https://discourse.julialang.org/u/nsajko)\
**Replies:** 7\
**Last updated:** [December 24, 2022, 3:21am UTC](https://discourse.julialang.org/t/dispatch-on-a-set-of-value-type-parameters/91864 "2022-12-24T03:21:47Z")

</div>

I have a type which has an Int value parameter, let’s represent the type like this: struct T{m} some\_fields end I want to define a method for a function f that takes a T value, but only if m is part of a certain fini…

---

## [Differential equations modeling ODE basics help](https://discourse.julialang.org/t/differential-equations-modeling-ode-basics-help/92071)

<div class="topic-metadata">

**Author:** [@colleybrb](https://discourse.julialang.org/u/colleybrb)\
**Replies:** 2\
**Last updated:** [December 24, 2022, 2:03pm UTC](https://discourse.julialang.org/t/differential-equations-modeling-ode-basics-help/92071 "2022-12-24T14:03:46Z")

</div>

I haven’t taken a calculus class in years. I recently took the mit computational modeling class in Julia. In the modeling class we used the SIR model. I’ve been trying to understand how to apply/ synthesize differential…

---

## [A Unified Interface for Rootfinding](https://discourse.julialang.org/t/a-unified-interface-for-rootfinding/698)

<div class="topic-metadata">

**Author:** [@ChrisRackauckas](https://discourse.julialang.org/u/ChrisRackauckas)\
**Replies:** 22\
**Last updated:** [December 24, 2022, 1:56pm UTC](https://discourse.julialang.org/t/a-unified-interface-for-rootfinding/698 "2022-12-24T13:56:23Z")

</div>

One of the most useful developments of Julia is the concept of the metapackage. A package management system coupled with multiple dispatch has lead to ecosystems like Plots.jl, DiffEqBase.jl (DifferentialEquations.jl), a…

---

## [In Gplots, draw PNG gplot applies incorrect edge label?](https://discourse.julialang.org/t/in-gplots-draw-png-gplot-applies-incorrect-edge-label/92033)

<div class="topic-metadata">

**Author:** [@Colin\_Beckingham](https://discourse.julialang.org/u/Colin_Beckingham)\
**Replies:** 3\
**Last updated:** [December 23, 2022, 1:35pm UTC](https://discourse.julialang.org/t/in-gplots-draw-png-gplot-applies-incorrect-edge-label/92033 "2022-12-23T13:35:04Z")

</div>

I’m experimenting with drawing PNG images of graphs. All is well except that when I attempt to use edge weights as edge labels, all the correct weight values appear in the image, but they are on the wrong edges. As I cr…

---

## [Stack different color palettes in a single plot](https://discourse.julialang.org/t/stack-different-color-palettes-in-a-single-plot/92076)

<div class="topic-metadata">

**Author:** [@Jose\_Diaz](https://discourse.julialang.org/u/Jose_Diaz)\
**Replies:** 1\
**Last updated:** [December 24, 2022, 12:02pm UTC](https://discourse.julialang.org/t/stack-different-color-palettes-in-a-single-plot/92076 "2022-12-24T12:02:54Z")

</div>

Hello! Let’s say I have the following code. using Plots plots = palette.(\[:leonardo, :autumn\]) By doing that, I create a Vector{ColorPalette}, but actually I’d like to stack and display both color palettes (hopefully…

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

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