# Latest

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

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

**Page:** 778

---

## [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 = { …

---

## [Announcing Julia implementation of IntermittentDemand package on GitHub](https://discourse.julialang.org/t/announcing-julia-implementation-of-intermittentdemand-package-on-github/94824)

<div class="topic-metadata">

**Author:** [@Resul.Akay](https://discourse.julialang.org/u/Resul.Akay)\
**Replies:** 2\
**Last updated:** [February 18, 2023, 9:58am UTC](https://discourse.julialang.org/t/announcing-julia-implementation-of-intermittentdemand-package-on-github/94824 "2023-02-18T09:58:21Z")

</div>

Dear Julia community, I’m excited to announce the release of IntermittentDemand.jl on GitHub. This package provides the following forecasting methods for now: Croston’s method Syntetos-Boylan Approximation Shale-Boyl…

---

## [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…

---

## [What is the most idiomatic way to implement bounds checking in \`getindex\` for arbitrary types?](https://discourse.julialang.org/t/what-is-the-most-idiomatic-way-to-implement-bounds-checking-in-getindex-for-arbitrary-types/94779)

<div class="topic-metadata">

**Author:** [@loonatick-src](https://discourse.julialang.org/u/loonatick-src)\
**Replies:** 3\
**Last updated:** [February 18, 2023, 4:34am UTC](https://discourse.julialang.org/t/what-is-the-most-idiomatic-way-to-implement-bounds-checking-in-getindex-for-arbitrary-types/94779 "2023-02-18T04:34:47Z")

</div>

Specifically, I have two main requirements in mind. It should throw BoundsError with complete information. The @inbounds macro should work as intended for this type, i.e. elide the bounds checking entirely Item 1 seem…

---

## [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 …

---

## [Registry for docs CI not updated?](https://discourse.julialang.org/t/registry-for-docs-ci-not-updated/94807)

<div class="topic-metadata">

**Author:** [@lmiq](https://discourse.julialang.org/u/lmiq)\
**Replies:** 1\
**Last updated:** [February 18, 2023, 1:32am UTC](https://discourse.julialang.org/t/registry-for-docs-ci-not-updated/94807 "2023-02-18T01:32:11Z")

</div>

Is there any reason for the Julia registry to remain outdated in the Docs CI only? I’m having trouble with this run: update compat entry · m3g/ComplexMixtures.jl@606dc97 · GitHub Which fails with a compatibility proble…

---

## [CSV.write writeshortest error](https://discourse.julialang.org/t/csv-write-writeshortest-error/90336)

<div class="topic-metadata">

**Author:** [@compleat](https://discourse.julialang.org/u/compleat)\
**Replies:** 17\
**Last updated:** [February 18, 2023, 12:00am UTC](https://discourse.julialang.org/t/csv-write-writeshortest-error/90336 "2023-02-18T00:00:51Z")

</div>

I have been trying for several days to save a dataframe and cannot seem to avoid the same recurring error. Here is the beginning of my file: df\_rtns6\[1:5,1:5\] Date AAPL\_Close ABT\_Close ADBE\_Close AIG\_Close String Flo…

---

## [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\_…

---

## [Can Julia optimize mutable static arrays to be allocated on the stack?](https://discourse.julialang.org/t/can-julia-optimize-mutable-static-arrays-to-be-allocated-on-the-stack/66360)

<div class="topic-metadata">

**Author:** [@greatpet](https://discourse.julialang.org/u/greatpet)\
**Replies:** 9\
**Last updated:** [February 17, 2023, 9:54pm UTC](https://discourse.julialang.org/t/can-julia-optimize-mutable-static-arrays-to-be-allocated-on-the-stack/66360 "2023-02-17T21:54:23Z")

</div>

According to the documentation of StaticArrays.jl, mutable static arrays are implemented as mutable structs and are allocated on the heap even though their sizes are known at compile time. Is Julia’s compiler able to det…

---

## [Loops vs Vectorization? When to use?](https://discourse.julialang.org/t/loops-vs-vectorization-when-to-use/94724)

<div class="topic-metadata">

**Author:** [@marianoarnaiz](https://discourse.julialang.org/u/marianoarnaiz)\
**Replies:** 18\
**Last updated:** [February 17, 2023, 9:29pm UTC](https://discourse.julialang.org/t/loops-vs-vectorization-when-to-use/94724 "2023-02-17T21:29:27Z")

</div>

Hi everyone. I am optimizing some older codes of mine. I find that sometimes vectorizing is faster than looping (which did not happen before) Could anyone explain when it is better to use one or the other in Julia. Tha…

---

## [Seeking short examples to "sell" Julia's type system](https://discourse.julialang.org/t/seeking-short-examples-to-sell-julias-type-system/93502)

<div class="topic-metadata">

**Author:** [@jacobusmmsmit](https://discourse.julialang.org/u/jacobusmmsmit)\
**Replies:** 28\
**Last updated:** [February 17, 2023, 8:17pm UTC](https://discourse.julialang.org/t/seeking-short-examples-to-sell-julias-type-system/93502 "2023-02-17T20:17:34Z")

</div>

Context In a few days, I’m going to go try to sell (as in persuade, not monetarily) a short Julia course to some first year MSc AI students. The majority of these students come from a comparatively stronger mathematical…

---

## [Pass by reference of map typed struct(CxxWrap.jl)](https://discourse.julialang.org/t/pass-by-reference-of-map-typed-struct-cxxwrap-jl/82545)

<div class="topic-metadata">

**Author:** [@kemu](https://discourse.julialang.org/u/kemu)\
**Replies:** 1\
**Last updated:** [February 17, 2023, 6:50pm UTC](https://discourse.julialang.org/t/pass-by-reference-of-map-typed-struct-cxxwrap-jl/82545 "2023-02-17T18:50:09Z")

</div>

pass by reference of map typed struct(CxxWrap.jl) Hi, I’m trying to pass the argument by reference from Julia to C++. This argument is simple struct, so I used map\_type at wrap module difinition. I am having trouble …

---

## [Call c++ functions using ccall](https://discourse.julialang.org/t/call-c-functions-using-ccall/94799)

<div class="topic-metadata">

**Author:** [@linwaytin](https://discourse.julialang.org/u/linwaytin)\
**Replies:** 5\
**Last updated:** [February 17, 2023, 6:39pm UTC](https://discourse.julialang.org/t/call-c-functions-using-ccall/94799 "2023-02-17T18:39:28Z")

</div>

I have a library in c++, from which I want to call some function. I have tried CxxWrap, which kind of work and seems not stable and I sometimes got segmentation faults. I tried to call the function using ccall((:myFunc,…

---

## [With CxxWrap, method cannot return an usable complex number](https://discourse.julialang.org/t/with-cxxwrap-method-cannot-return-an-usable-complex-number/94801)

<div class="topic-metadata">

**Author:** [@gdmsl](https://discourse.julialang.org/u/gdmsl)\
**Replies:** 0\
**Last updated:** [February 17, 2023, 5:57pm UTC](https://discourse.julialang.org/t/with-cxxwrap-method-cannot-return-an-usable-complex-number/94801 "2023-02-17T17:57:42Z")

</div>

Hi, I am trying to use CxxWrap to wrap a C++ library. I am wrapping a type that has a method that returns a std::complex. I have also wrapped the std::complex type, since it is not already in the CxxWrap library. The p…

---

## [Makie and PackageCompiler error on Windows](https://discourse.julialang.org/t/makie-and-packagecompiler-error-on-windows/92663)

<div class="topic-metadata">

**Author:** [@skleinbo](https://discourse.julialang.org/u/skleinbo)\
**Replies:** 3\
**Last updated:** [February 17, 2023, 4:22pm UTC](https://discourse.julialang.org/t/makie-and-packagecompiler-error-on-windows/92663 "2023-02-17T16:22:29Z")

</div>

In a fresh environment Julia Version 1.8.4 Commit 00177ebc4f (2022-12-23 21:32 UTC) Platform Info: OS: Windows (x86\_64-w64-mingw32) CPU: 4 × Intel(R) Core(TM) i5-6500 CPU @ 3.20GHz WORD\_SIZE: 64 LIBM: libopenlib…

---

## [Confused about the order of TaskFailedException's showerror](https://discourse.julialang.org/t/confused-about-the-order-of-taskfailedexceptions-showerror/94679)

<div class="topic-metadata">

**Author:** [@nrontsis](https://discourse.julialang.org/u/nrontsis)\
**Replies:** 1\
**Last updated:** [February 17, 2023, 2:23pm UTC](https://discourse.julialang.org/t/confused-about-the-order-of-taskfailedexceptions-showerror/94679 "2023-02-17T14:23:40Z")

</div>

In the stacktrace, I typically expect that scrolling all the way up will get me to the “deepest” level of the call stack. However, when having code in @threads, the resulting exceptions are TaskFailedException that prin…

---

## [Can an overloaded vector operator be broadcast?](https://discourse.julialang.org/t/can-an-overloaded-vector-operator-be-broadcast/94651)

<div class="topic-metadata">

**Author:** [@g2g](https://discourse.julialang.org/u/g2g)\
**Replies:** 15\
**Last updated:** [February 17, 2023, 4:35pm UTC](https://discourse.julialang.org/t/can-an-overloaded-vector-operator-be-broadcast/94651 "2023-02-17T16:35:51Z")

</div>

I’m porting some projective geometric algebra (PGA) applications from ganja.js (JavaScript) to Julia+Makie. In the applications I’m porting (and I suspect in many other PGA applications) it would be convenient to be able…

---

## [DataFrames Plot: Plot the year for the x-tick at x-axis](https://discourse.julialang.org/t/dataframes-plot-plot-the-year-for-the-x-tick-at-x-axis/94782)

<div class="topic-metadata">

**Author:** [@Freya\_the\_Goddess](https://discourse.julialang.org/u/Freya_the_Goddess)\
**Replies:** 8\
**Last updated:** [February 17, 2023, 4:00pm UTC](https://discourse.julialang.org/t/dataframes-plot-plot-the-year-for-the-x-tick-at-x-axis/94782 "2023-02-17T16:00:54Z")

</div>

Hi all, I am using the source of historical data from: Stock Market Indices - Investing.com I want to plot the price (graph plot) from the csv I downloaded (JKSE / Jakarta Stock Composite Index). But, the x-tick is nu…

---

## [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…

---

## [A hacky guide to using automatic differentiation in nested optimization problems](https://discourse.julialang.org/t/a-hacky-guide-to-using-automatic-differentiation-in-nested-optimization-problems/39123)

<div class="topic-metadata">

**Author:** [@jeffreyesun](https://discourse.julialang.org/u/jeffreyesun)\
**Replies:** 25\
**Last updated:** [February 17, 2023, 3:32pm UTC](https://discourse.julialang.org/t/a-hacky-guide-to-using-automatic-differentiation-in-nested-optimization-problems/39123 "2023-02-17T15:32:11Z")

</div>

Unconstrained Optimization Automatic differentiation is amazing. But models in my field, economics, often include nested optimization problems. A simple example might look like this, where x is a vector or scalar. y = …

---

## [IRTools/Cassette question: Is it possible to replace everything with invokelatest?](https://discourse.julialang.org/t/irtools-cassette-question-is-it-possible-to-replace-everything-with-invokelatest/94785)

<div class="topic-metadata">

**Author:** [@schlichtanders](https://discourse.julialang.org/u/schlichtanders)\
**Replies:** 4\
**Last updated:** [February 17, 2023, 1:41pm UTC](https://discourse.julialang.org/t/irtools-cassette-question-is-it-possible-to-replace-everything-with-invokelatest/94785 "2023-02-17T13:41:05Z")

</div>

Hi there, I would like to build a rewriting system which ensures that everything will call the latest methods. This could be useful for developing long running applications like web servers. goal allinvokelatest() do …

---

## [Which kernel is Jupyter running?](https://discourse.julialang.org/t/which-kernel-is-jupyter-running/93932)

<div class="topic-metadata">

**Author:** [@stecrotti](https://discourse.julialang.org/u/stecrotti)\
**Replies:** 1\
**Last updated:** [February 17, 2023, 1:09pm UTC](https://discourse.julialang.org/t/which-kernel-is-jupyter-running/93932 "2023-02-17T13:09:25Z")

</div>

Hi, I’ve set up several IJulia 1.8.0 kernels, a plain one, another with 4 threads, another with 10, and so on. I can start any of them without problems screenshot but once it’s up and going, there seems to be no infor…

---

## [Graph.jl : How to interpret the output information returned by the shortest path algorithms?](https://discourse.julialang.org/t/graph-jl-how-to-interpret-the-output-information-returned-by-the-shortest-path-algorithms/94752)

<div class="topic-metadata">

**Author:** [@F\_A](https://discourse.julialang.org/u/F_A)\
**Replies:** 10\
**Last updated:** [February 17, 2023, 11:13am UTC](https://discourse.julialang.org/t/graph-jl-how-to-interpret-the-output-information-returned-by-the-shortest-path-algorithms/94752 "2023-02-17T11:13:23Z")

</div>

Hi there, I’d like to use Graph.jl package to run a shortest path algorithm. I have already read this page and am still not sure how to interpret the return traversal information of shortest path algorithm. Let’s assu…

---

## [Makie surface not working with Observables](https://discourse.julialang.org/t/makie-surface-not-working-with-observables/94786)

<div class="topic-metadata">

**Author:** [@AwesomeQuest](https://discourse.julialang.org/u/AwesomeQuest)\
**Replies:** 0\
**Last updated:** [February 17, 2023, 10:37am UTC](https://discourse.julialang.org/t/makie-surface-not-working-with-observables/94786 "2023-02-17T10:37:23Z")

</div>

When I make a surface with Observables in Makie using GLMakie sep = Observable(.01) xlim = Observable(5) ylim = Observable(10) x = @lift(-$xlim:$sep:$xlim) y = @lift(-$ylim:$sep:$ylim) z = @lift(\[i\*j for i in $x, j in …

---

## [\[ANN\] EquivalentCircuits.jl for impedance spectroscopy analysis in Julia](https://discourse.julialang.org/t/ann-equivalentcircuits-jl-for-impedance-spectroscopy-analysis-in-julia/94133)

<div class="topic-metadata">

**Author:** [@MaximeVH](https://discourse.julialang.org/u/MaximeVH)\
**Replies:** 6\
**Last updated:** [February 16, 2023, 9:47am UTC](https://discourse.julialang.org/t/ann-equivalentcircuits-jl-for-impedance-spectroscopy-analysis-in-julia/94133 "2023-02-16T09:47:37Z")

</div>

To my knowledge, Julia has no other libraries for conducting equivalent electrical circuit-based electrochemical impedance spectroscopy (EIS) data analysis. EquivalentCircuits.jl 0.3.0 is a package allowing users to fit…

---

## [Create Histogram of Monthly Return with CSV and DataFrames](https://discourse.julialang.org/t/create-histogram-of-monthly-return-with-csv-and-dataframes/94729)

<div class="topic-metadata">

**Author:** [@Freya\_the\_Goddess](https://discourse.julialang.org/u/Freya_the_Goddess)\
**Replies:** 6\
**Last updated:** [February 17, 2023, 8:49am UTC](https://discourse.julialang.org/t/create-histogram-of-monthly-return-with-csv-and-dataframes/94729 "2023-02-17T08:49:50Z")

</div>

Hi all, I am reading this: and I want to plot a histogram for monthly return of a Shanghai Composite Index based on this code: using CSV, DataFrames #Read the CSV file and transform it into a DataFrame rai…

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

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