# Latest

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

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

**Page:** 1368

---

## [Inner constructor – checking for equal lengths](https://discourse.julialang.org/t/inner-constructor-checking-for-equal-lengths/62413)

<div class="topic-metadata">

**Author:** [@baptnz](https://discourse.julialang.org/u/baptnz)\
**Replies:** 10\
**Last updated:** [June 8, 2021, 9:09am UTC](https://discourse.julialang.org/t/inner-constructor-checking-for-equal-lengths/62413 "2021-06-08T09:09:28Z")

</div>

I’ve defined a custom type, which assumes implicitly that 4 of its objects have the same length. Is there a standard way to check for this (or is it a bad idea)? I tried an inner constructor with length check, but it fai…

---

## [Issues with saving plot as pdf](https://discourse.julialang.org/t/issues-with-saving-plot-as-pdf/46358)

<div class="topic-metadata">

**Author:** [@bhache](https://discourse.julialang.org/u/bhache)\
**Replies:** 6\
**Last updated:** [June 8, 2021, 8:29am UTC](https://discourse.julialang.org/t/issues-with-saving-plot-as-pdf/46358 "2021-06-08T08:29:51Z")

</div>

I was trying to save plots generated using gr() backend in pdf format and this messes up the negative values along y-axes. This doesn’t seem to happen when the figure is saved as png though. I am attaching the plot comma…

---

## [Only plot a subset of x](https://discourse.julialang.org/t/only-plot-a-subset-of-x/62485)

<div class="topic-metadata">

**Author:** [@Albert\_Zevelev](https://discourse.julialang.org/u/Albert_Zevelev)\
**Replies:** 10\
**Last updated:** [June 7, 2021, 10:54pm UTC](https://discourse.julialang.org/t/only-plot-a-subset-of-x/62485 "2021-06-07T22:54:07Z")

</div>

using CSV, HTTP, DataFrames, Statistics, Plots, Dates # Get Data link = "https://github.com/azev77/Synthetic\_Control\_in\_Julia/raw/main/HP\_q.csv" r = HTTP.get(link) df = CSV.read(r.body, DataFrame, missingstring="NA") …

---

## [Trouble using PencilArrays with DifferentialEquations](https://discourse.julialang.org/t/trouble-using-pencilarrays-with-differentialequations/61965)

<div class="topic-metadata">

**Author:** [@PlasmaJoe](https://discourse.julialang.org/u/PlasmaJoe)\
**Replies:** 10\
**Last updated:** [June 8, 2021, 7:51am UTC](https://discourse.julialang.org/t/trouble-using-pencilarrays-with-differentialequations/61965 "2021-06-08T07:51:31Z")

</div>

I’m working on a simulation that requires taking FFTs and IFFTs of pretty large systems (~1024x1024x2048 elements). Between transforms I need to advance all of the elements according to a differential equation. Because t…

---

## [Contour plots with varying locations for x-axis?](https://discourse.julialang.org/t/contour-plots-with-varying-locations-for-x-axis/61686)

<div class="topic-metadata">

**Author:** [@CosmoProf](https://discourse.julialang.org/u/CosmoProf)\
**Replies:** 13\
**Last updated:** [June 8, 2021, 7:45am UTC](https://discourse.julialang.org/t/contour-plots-with-varying-locations-for-x-axis/61686 "2021-06-08T07:45:18Z")

</div>

Hi, I have a set of 2-dimensional data, defined over an array of timesteps, but at each timestep the position x-values are different. I’m trying to get contour plots, but the plots come up blank, and each time I get the …

---

## [Inverse of a boolean (or integer) matrix vs factorization](https://discourse.julialang.org/t/inverse-of-a-boolean-or-integer-matrix-vs-factorization/62554)

<div class="topic-metadata">

**Author:** [@Krastanov](https://discourse.julialang.org/u/Krastanov)\
**Replies:** 7\
**Last updated:** [June 8, 2021, 7:28am UTC](https://discourse.julialang.org/t/inverse-of-a-boolean-or-integer-matrix-vs-factorization/62554 "2021-06-08T07:28:46Z")

</div>

My understanding is that factorization is almost always better than explicit inversion for a matrix of real (or complex) numbers (because usually you do not actually need the explicit inverse, rather some other operation…

---

## [LaTeX code for titles, labels,... with Plots.jl](https://discourse.julialang.org/t/latex-code-for-titles-labels-with-plots-jl/1967)

<div class="topic-metadata">

**Author:** [@Holy\_Monk](https://discourse.julialang.org/u/Holy_Monk)\
**Replies:** 34\
**Last updated:** [June 8, 2021, 6:49am UTC](https://discourse.julialang.org/t/latex-code-for-titles-labels-with-plots-jl/1967 "2021-06-08T06:49:09Z")

</div>

I am using Plots.jl for making plots, but I would like to have my legend, title, labels,… in latex typesetting. With other libraries I know I can just use L"…", but when I run the following code: using Plots plot(0:2,0:…

---

## [Check which Makie backend is activated](https://discourse.julialang.org/t/check-which-makie-backend-is-activated/62550)

<div class="topic-metadata">

**Author:** [@jzr](https://discourse.julialang.org/u/jzr)\
**Replies:** 1\
**Last updated:** [June 8, 2021, 5:34am UTC](https://discourse.julialang.org/t/check-which-makie-backend-is-activated/62550 "2021-06-08T05:34:23Z")

</div>

How can I check which backend is in use?

---

## [Makie: add title to plot](https://discourse.julialang.org/t/makie-add-title-to-plot/22340)

<div class="topic-metadata">

**Author:** [@jw3126](https://discourse.julialang.org/u/jw3126)\
**Replies:** 11\
**Last updated:** [June 8, 2021, 5:33am UTC](https://discourse.julialang.org/t/makie-add-title-to-plot/22340 "2021-06-08T05:33:45Z")

</div>

How to add a title to a Makie plot? I would to produce a plot like the following using Makie instead of Plots.jl: julia\> using Plots; plot(randn(10), title="my random numbers")

---

## [Continuous action space array](https://discourse.julialang.org/t/continuous-action-space-array/62515)

<div class="topic-metadata">

**Author:** [@GK\_197](https://discourse.julialang.org/u/GK_197)\
**Replies:** 3\
**Last updated:** [June 8, 2021, 5:30am UTC](https://discourse.julialang.org/t/continuous-action-space-array/62515 "2021-06-08T05:30:50Z")

</div>

Hi, I have a question regarding implementation of multidimensional array in continuous action spaces. I am trying to implement DDPG algorithm for a problem which requires action space in 1-D vector. A = \[ClosedInterval…

---

## [How to "center" the color gradient in a heatmap/contour plot](https://discourse.julialang.org/t/how-to-center-the-color-gradient-in-a-heatmap-contour-plot/62382)

<div class="topic-metadata">

**Author:** [@CosmoProf](https://discourse.julialang.org/u/CosmoProf)\
**Replies:** 7\
**Last updated:** [June 8, 2021, 5:05am UTC](https://discourse.julialang.org/t/how-to-center-the-color-gradient-in-a-heatmap-contour-plot/62382 "2021-06-08T05:05:08Z")

</div>

Hi again all, a question about visualization: I’m using heatmaps (and sometimes contour plots) to visualize an oscillating function, using commands similar to: heatmap(xArray, yArray, MatrixOfValues, color=cgrad(\[:red,…

---

## [Functors and allocations](https://discourse.julialang.org/t/functors-and-allocations/62547)

<div class="topic-metadata">

**Author:** [@vettert](https://discourse.julialang.org/u/vettert)\
**Replies:** 4\
**Last updated:** [June 8, 2021, 5:04am UTC](https://discourse.julialang.org/t/functors-and-allocations/62547 "2021-06-08T05:04:04Z")

</div>

I would like define a custom type carrying parameters for a function inside it and then I would like to update the parameters of the function. The problem is that I don’t know the number of parameters a priori (it shall…

---

## [Benders framework of cplex in JuMP](https://discourse.julialang.org/t/benders-framework-of-cplex-in-jump/62557)

<div class="topic-metadata">

**Author:** [@BYS](https://discourse.julialang.org/u/BYS)\
**Replies:** 4\
**Last updated:** [June 8, 2021, 4:33am UTC](https://discourse.julialang.org/t/benders-framework-of-cplex-in-jump/62557 "2021-06-08T04:33:10Z")

</div>

Hi, everyone Does JuMP support the Benders decomposition interface of cplex(IBM Documentation)? I find cplex doesn’t support the examples for Julia. I have a model,which the master problem is MILP, and the subproblem is…

---

## [ForwardDiff and ImageTransformations](https://discourse.julialang.org/t/forwarddiff-and-imagetransformations/62373)

<div class="topic-metadata">

**Author:** [@Arrigo\_Benedetti](https://discourse.julialang.org/u/Arrigo_Benedetti)\
**Replies:** 2\
**Last updated:** [June 8, 2021, 2:59am UTC](https://discourse.julialang.org/t/forwarddiff-and-imagetransformations/62373 "2021-06-08T02:59:35Z")

</div>

I am trying to compute the gradient of a cost function defined as the Sum of Square Differences (SSD) between two images with respect to the parameters of an image transformation. In the code shown below, one of the imag…

---

## [MethodError: no method matching Weights(::Array{Any,1}, ::Float64)](https://discourse.julialang.org/t/methoderror-no-method-matching-weights-array-any-1-float64/62551)

<div class="topic-metadata">

**Author:** [@Sebastian\_Mena](https://discourse.julialang.org/u/Sebastian_Mena)\
**Replies:** 0\
**Last updated:** [June 8, 2021, 1:24am UTC](https://discourse.julialang.org/t/methoderror-no-method-matching-weights-array-any-1-float64/62551 "2021-06-08T01:24:03Z")

</div>

Hi, I’m trying to do a sample of a string array, incorporating weights for each of the elements of the array. Specifically, new\_name\_event = sample(events,Weights(dict\_betas\_choices\[string(new\_player)\]\[new\_zone\]\[string…

---

## [Numerical difference between Julia and (C, Fortran, Python) for a chaotic damped driven pendulum](https://discourse.julialang.org/t/numerical-difference-between-julia-and-c-fortran-python-for-a-chaotic-damped-driven-pendulum/62195)

<div class="topic-metadata">

**Author:** [@mendeli](https://discourse.julialang.org/u/mendeli)\
**Replies:** 17\
**Last updated:** [June 8, 2021, 12:22am UTC](https://discourse.julialang.org/t/numerical-difference-between-julia-and-c-fortran-python-for-a-chaotic-damped-driven-pendulum/62195 "2021-06-08T00:22:17Z")

</div>

I wrote a simple code implementing a midpoint 2nd order Runge-Kutta method for a damped driven pendulum in different languages to compare run times. While the results were exactly the same for C, Fortran and Python (Fort…

---

## [Julia Development on Mobile (Android)](https://discourse.julialang.org/t/julia-development-on-mobile-android/62543)

<div class="topic-metadata">

**Author:** [@Rabioli](https://discourse.julialang.org/u/Rabioli)\
**Replies:** 4\
**Last updated:** [June 8, 2021, 12:04am UTC](https://discourse.julialang.org/t/julia-development-on-mobile-android/62543 "2021-06-08T00:04:45Z")

</div>

For a personal project I want to practice and use Julia as the programming language to compose and create a mobile app on android, I am not sure where or how to even begin or if there is even any package oriented or desi…

---

## [View a scalar as a vector/array](https://discourse.julialang.org/t/view-a-scalar-as-a-vector-array/62535)

<div class="topic-metadata">

**Author:** [@nchisholm](https://discourse.julialang.org/u/nchisholm)\
**Replies:** 3\
**Last updated:** [June 7, 2021, 9:08pm UTC](https://discourse.julialang.org/t/view-a-scalar-as-a-vector-array/62535 "2021-06-07T21:08:13Z")

</div>

Is there is any built-in mechanism in Julia to “view” a scalar quantity, like a number, as an array? I am thinking something like as follows, given that the shape of b and c could be broadcast against A. A = ones(3, 3)…

---

## [Help with Weave.jl for Julia Markdown in VS](https://discourse.julialang.org/t/help-with-weave-jl-for-julia-markdown-in-vs/62508)

<div class="topic-metadata">

**Author:** [@ChiaraS](https://discourse.julialang.org/u/ChiaraS)\
**Replies:** 3\
**Last updated:** [June 7, 2021, 9:07pm UTC](https://discourse.julialang.org/t/help-with-weave-jl-for-julia-markdown-in-vs/62508 "2021-06-07T21:07:53Z")

</div>

Hello everyone, Im trying to markdown my Julia code for a paper in Visual Studio. But I cant seem to get the weave.jl package properly working. I am lost at how to correctly set the normpath. I have looked up the docume…

---

## [Pkg.status returns nothing (when running in jupyter notebook)](https://discourse.julialang.org/t/pkg-status-returns-nothing-when-running-in-jupyter-notebook/62545)

<div class="topic-metadata">

**Author:** [@Torkel](https://discourse.julialang.org/u/Torkel)\
**Replies:** 2\
**Last updated:** [June 7, 2021, 9:04pm UTC](https://discourse.julialang.org/t/pkg-status-returns-nothing-when-running-in-jupyter-notebook/62545 "2021-06-07T21:04:12Z")

</div>

I’m running a jupyter notebook in a folder in which I both have a Manifest.toml and a Project.toml file. When I run using Pkg Pkg.status() the output is nothing. If I start a julia session from the same folder (and run…

---

## [Cross platform package and package naming guidelines](https://discourse.julialang.org/t/cross-platform-package-and-package-naming-guidelines/62506)

<div class="topic-metadata">

**Author:** [@pbayer](https://discourse.julialang.org/u/pbayer)\
**Replies:** 7\
**Last updated:** [June 7, 2021, 7:29pm UTC](https://discourse.julialang.org/t/cross-platform-package-and-package-naming-guidelines/62506 "2021-06-07T19:29:51Z")

</div>

I would like to create Github-repo erjulix for a package Erjulix which makes it possible to send messages/data from Erlang/Elixir to Julia and back and call functions or eval expressions cross-platform. The functionality…

---

## [How to specify a type of Vector, SVector, OR Tuple of a certain type, such as Int?](https://discourse.julialang.org/t/how-to-specify-a-type-of-vector-svector-or-tuple-of-a-certain-type-such-as-int/62537)

<div class="topic-metadata">

**Author:** [@jinml](https://discourse.julialang.org/u/jinml)\
**Replies:** 3\
**Last updated:** [June 7, 2021, 6:44pm UTC](https://discourse.julialang.org/t/how-to-specify-a-type-of-vector-svector-or-tuple-of-a-certain-type-such-as-int/62537 "2021-06-07T18:44:15Z")

</div>

I’d like the function to take a Vector, an SVector or Tuple of certain eltype, and unspecified length, what is the most concise type qualifier? Thanks,

---

## [VS Code: cannot see plots or click on them in the new Plot Navigator](https://discourse.julialang.org/t/vs-code-cannot-see-plots-or-click-on-them-in-the-new-plot-navigator/62534)

<div class="topic-metadata">

**Author:** [@DenisTitov](https://discourse.julialang.org/u/DenisTitov)\
**Replies:** 1\
**Last updated:** [June 7, 2021, 5:51pm UTC](https://discourse.julialang.org/t/vs-code-cannot-see-plots-or-click-on-them-in-the-new-plot-navigator/62534 "2021-06-07T17:51:51Z")

</div>

I can only see plot names in the new plot navigator. I cannot see actual plots and I cannot click on them. Am I missing something? I assumed I was supposed to see plots and be able to click on them for easier navigatio…

---

## [Newton method in PowerModels.jl](https://discourse.julialang.org/t/newton-method-in-powermodels-jl/61568)

<div class="topic-metadata">

**Author:** [@Mariana](https://discourse.julialang.org/u/Mariana)\
**Replies:** 3\
**Last updated:** [June 7, 2021, 5:21pm UTC](https://discourse.julialang.org/t/newton-method-in-powermodels-jl/61568 "2021-06-07T17:21:41Z")

</div>

Hello! I am trying to run a power flow in PowerModels.jl by using Newton method. I am running compute\_ac\_pf, but the result of this function is a dictionary containing generation and voltages at the buses, and it does n…

---

## [Workflow for flotting GPS data over map background](https://discourse.julialang.org/t/workflow-for-flotting-gps-data-over-map-background/62522)

<div class="topic-metadata">

**Author:** [@HugoTrentesaux](https://discourse.julialang.org/u/HugoTrentesaux)\
**Replies:** 22\
**Last updated:** [June 7, 2021, 5:11pm UTC](https://discourse.julialang.org/t/workflow-for-flotting-gps-data-over-map-background/62522 "2021-06-07T17:11:07Z")

</div>

The workflow for plotting GPS data over a map background with a given projection is pretty common. However, I did not find any tutorial or documentation about it. https://juliageo.org/ mentions many packages to deal with…

---

## [Common LAPACK/Blas utility functions](https://discourse.julialang.org/t/common-lapack-blas-utility-functions/62530)

<div class="topic-metadata">

**Author:** [@dgleich](https://discourse.julialang.org/u/dgleich)\
**Replies:** 1\
**Last updated:** [June 7, 2021, 4:35pm UTC](https://discourse.julialang.org/t/common-lapack-blas-utility-functions/62530 "2021-06-07T16:35:32Z")

</div>

LAPACK and Blas have all these handy little routines like dlascl - scale an array between two normalized quantities handling overflow/underflow/etc. # \_dlascl(from, to, x) # This will compute x .\*= x (to/from) and hand…

---

## [What do you work on? Why is it important?](https://discourse.julialang.org/t/what-do-you-work-on-why-is-it-important/62101)

<div class="topic-metadata">

**Author:** [@dfdx](https://discourse.julialang.org/u/dfdx)\
**Replies:** 29\
**Last updated:** [June 7, 2021, 4:18pm UTC](https://discourse.julialang.org/t/what-do-you-work-on-why-is-it-important/62101 "2021-06-07T16:18:57Z")

</div>

In a recent conversation with a friend he asked me why I spend so much time on Julia ecosystem. He generally liked the language and agreed it’s an excellent tool for many technical tasks, but he expressed doubts that Jul…

---

## [Ideal diode: MTK+callbacks to mimic Verilog-A events?](https://discourse.julialang.org/t/ideal-diode-mtk-callbacks-to-mimic-verilog-a-events/62528)

<div class="topic-metadata">

**Author:** [@MA\_Laforge](https://discourse.julialang.org/u/MA_Laforge)\
**Replies:** 1\
**Last updated:** [June 7, 2021, 4:15pm UTC](https://discourse.julialang.org/t/ideal-diode-mtk-callbacks-to-mimic-verilog-a-events/62528 "2021-06-07T16:15:03Z")

</div>

Verilog-A-like circuit components I recently found examples how to use ModelingToolkit.jl to model electrical circuit components in a Verilog-A-esque fashion. Pretty neat!: → https://github.com/SciML/ModelingToolkit.jl…

---

## [June JuliaHEP Meeting](https://discourse.julialang.org/t/june-juliahep-meeting/61540)

<div class="topic-metadata">

**Author:** [@lyonsquark](https://discourse.julialang.org/u/lyonsquark)\
**Replies:** 2\
**Last updated:** [June 7, 2021, 4:07pm UTC](https://discourse.julialang.org/t/june-juliahep-meeting/61540 "2021-06-07T16:07:34Z")

</div>

After a bit of a hiatus, it would be good to have another JuliaHEP (Julia and High Energy Physics) meeting. Please see the Google Doc at Julia in HEP - Google Docs for the Doodle Poll link and fill it out if you are inte…

---

## [What are the popgen and bioinformatics weaknesses](https://discourse.julialang.org/t/what-are-the-popgen-and-bioinformatics-weaknesses/62469)

<div class="topic-metadata">

**Author:** [@EvoArt](https://discourse.julialang.org/u/EvoArt)\
**Replies:** 7\
**Last updated:** [June 7, 2021, 3:42pm UTC](https://discourse.julialang.org/t/what-are-the-popgen-and-bioinformatics-weaknesses/62469 "2021-06-07T15:42:17Z")

</div>

Just wondering if any Julia users still call python/R or just straight don’t use Julia for any area of bioinformatics or population genetics analyses? And why?

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

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