# General Usage

**URL:** https://discourse.julialang.org/c/usage/6.md?page=240

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

**Page:** 241

---

## [How to scale the density of violin plot](https://discourse.julialang.org/t/how-to-scale-the-density-of-violin-plot/104737)

<div class="topic-metadata">

**Author:** [@Christopher\_Fisher](https://discourse.julialang.org/u/Christopher_Fisher)\
**Replies:** 2\
**Last updated:** [October 9, 2023, 11:06am UTC](https://discourse.julialang.org/t/how-to-scale-the-density-of-violin-plot/104737 "2023-10-09T11:06:58Z")

</div>

I would like to use a violin plot to display density information. For the x-axis, the scaling matters. However, only the shape of the densities matter. How can I rescale the densities to prevent occlusion? Here is a si…

---

## [Scalability and Efficiency of Julia for a Multi-Agent Scheduling System?](https://discourse.julialang.org/t/scalability-and-efficiency-of-julia-for-a-multi-agent-scheduling-system/104320)

<div class="topic-metadata">

**Author:** [@brunbjerg](https://discourse.julialang.org/u/brunbjerg)\
**Replies:** 13\
**Last updated:** [October 9, 2023, 11:06am UTC](https://discourse.julialang.org/t/scalability-and-efficiency-of-julia-for-a-multi-agent-scheduling-system/104320 "2023-10-09T11:06:08Z")

</div>

I’m working on a Ph.D. project, trying to design a multi-agent scheduling system where I need high performance, scalability and reliability. Initially, I thought about creating a metaheuristic/Matheuristic model to solv…

---

## [To convert vector of different dimension-vectors to matrix](https://discourse.julialang.org/t/to-convert-vector-of-different-dimension-vectors-to-matrix/104730)

<div class="topic-metadata">

**Author:** [@gkeee](https://discourse.julialang.org/u/gkeee)\
**Replies:** 8\
**Last updated:** [October 9, 2023, 10:25am UTC](https://discourse.julialang.org/t/to-convert-vector-of-different-dimension-vectors-to-matrix/104730 "2023-10-09T10:25:05Z")

</div>

a 3-element Vector{Vector{Float64}}: \[1.0\] \[1.0, -1.0\] \[1.0, -2.0, 0.5\] ı want to obtain \[1.0, 0.0, 0.0; 1.0, -1.0, 0.0; 1.0, -2.0, 0.5\] How can ı do?

---

## [Unknown memory allocation when displaying pixels in Gtk.jl](https://discourse.julialang.org/t/unknown-memory-allocation-when-displaying-pixels-in-gtk-jl/82566)

<div class="topic-metadata">

**Author:** [@Alan\_Bahm](https://discourse.julialang.org/u/Alan_Bahm)\
**Replies:** 1\
**Last updated:** [October 9, 2023, 9:47am UTC](https://discourse.julialang.org/t/unknown-memory-allocation-when-displaying-pixels-in-gtk-jl/82566 "2023-10-09T09:47:29Z")

</div>

Hi all! I have some memory allocation I don’t understand when using Gtk, and hoping for some advice. I’ve built an application to display and tweak (many) scientifically computed 2kx2k images, and they are displayed …

---

## [Adding network graph edges at each model step](https://discourse.julialang.org/t/adding-network-graph-edges-at-each-model-step/104720)

<div class="topic-metadata">

**Author:** [@SageAnastasi](https://discourse.julialang.org/u/SageAnastasi)\
**Replies:** 1\
**Last updated:** [October 9, 2023, 9:26am UTC](https://discourse.julialang.org/t/adding-network-graph-edges-at-each-model-step/104720 "2023-10-09T09:26:40Z")

</div>

Hi! I’m working on agent-based modelling of a social network graph. I’ve been basing my first attempt on hacking together the Schelling segregation and schoolyard examples. The model is supposed to check whether each age…

---

## [Any general ideas about reducing GC time involving DataFrames?](https://discourse.julialang.org/t/any-general-ideas-about-reducing-gc-time-involving-dataframes/104740)

<div class="topic-metadata">

**Author:** [@liuyxpp](https://discourse.julialang.org/u/liuyxpp)\
**Replies:** 2\
**Last updated:** [October 9, 2023, 1:57am UTC](https://discourse.julialang.org/t/any-general-ideas-about-reducing-gc-time-involving-dataframes/104740 "2023-10-09T01:57:40Z")

</div>

Say I have thousands of CSV files to be processed. For each, I will read the file into a Dataframe, process it, and then store the results in another DataFrame. During this process, it seems two main allocations (one for…

---

## [Plot function (from Plots) fails for simple trigonometry](https://discourse.julialang.org/t/plot-function-from-plots-fails-for-simple-trigonometry/104723)

<div class="topic-metadata">

**Author:** [@StevenSiew](https://discourse.julialang.org/u/StevenSiew)\
**Replies:** 10\
**Last updated:** [October 8, 2023, 7:44pm UTC](https://discourse.julialang.org/t/plot-function-from-plots-fails-for-simple-trigonometry/104723 "2023-10-08T19:44:28Z")

</div>

plot(0:0.1:2pi,\[sin(x)^1+cos(x)^1 for x=0:0.1:2pi\]) gives you But julia\> plot(0:0.1:2pi,\[sin(x)^2+cos(x)^2 for x=0:0.1:2pi\]) ┌ Warning: No strict ticks found └ @ PlotUtils ~/.julia/packages/PlotUtils/bZEEj/src/ticks…

---

## [Sum of temperature values with Unitful.jl](https://discourse.julialang.org/t/sum-of-temperature-values-with-unitful-jl/104714)

<div class="topic-metadata">

**Author:** [@fnoessler](https://discourse.julialang.org/u/fnoessler)\
**Replies:** 3\
**Last updated:** [October 8, 2023, 6:37pm UTC](https://discourse.julialang.org/t/sum-of-temperature-values-with-unitful-jl/104714 "2023-10-08T18:37:13Z")

</div>

Hello, is there a way to calculate the (cumulative) sum of temperature values in °C with Unitful.jl? I know this does not have a direct physical meaning. Nonetheless, it would be nice to keep the °C unit attached to my…

---

## [How do I find which packages are preventing DataFrames.jl from updating?](https://discourse.julialang.org/t/how-do-i-find-which-packages-are-preventing-dataframes-jl-from-updating/104703)

<div class="topic-metadata">

**Author:** [@Soldalma](https://discourse.julialang.org/u/Soldalma)\
**Replies:** 9\
**Last updated:** [October 8, 2023, 5:04pm UTC](https://discourse.julialang.org/t/how-do-i-find-which-packages-are-preventing-dataframes-jl-from-updating/104703 "2023-10-08T17:04:41Z")

</div>

The package DataFrames.jl is stuck in version v1.3.6 in my environment. I looked at Manifest.jl and deleted all the packages I could that were dependencies. Then I tried to update DataFrames.jl and still it did not updat…

---

## [What is the mechanics of \`copy\` in the thread-parallization by \`Threads.@spawn\`? Or: Problems with copy arrays in thread parallelism](https://discourse.julialang.org/t/what-is-the-mechanics-of-copy-in-the-thread-parallization-by-threads-spawn-or-problems-with-copy-arrays-in-thread-parallelism/104729)

<div class="topic-metadata">

**Author:** [@draftman9](https://discourse.julialang.org/u/draftman9)\
**Replies:** 1\
**Last updated:** [October 8, 2023, 4:40pm UTC](https://discourse.julialang.org/t/what-is-the-mechanics-of-copy-in-the-thread-parallization-by-threads-spawn-or-problems-with-copy-arrays-in-thread-parallelism/104729 "2023-10-08T16:40:19Z")

</div>

I hope to implement a thread-parallel sample, a common example in solving time-dependent evolution problems (e.g. main\_serial in the code. Generate a matrix arr\_task over time. This matrix is updated over loop/time and …

---

## [How to adjust the spacing for a plot's title and a plot's legend using Plots.jl?](https://discourse.julialang.org/t/how-to-adjust-the-spacing-for-a-plots-title-and-a-plots-legend-using-plots-jl/104667)

<div class="topic-metadata">

**Author:** [@Hugo](https://discourse.julialang.org/u/Hugo)\
**Replies:** 1\
**Last updated:** [October 8, 2023, 3:28pm UTC](https://discourse.julialang.org/t/how-to-adjust-the-spacing-for-a-plots-title-and-a-plots-legend-using-plots-jl/104667 "2023-10-08T15:28:50Z")

</div>

I am working with Plots.jl and I’d like to have more flexibility to adjust the spacings in the plots. I provide below a short piece of code that requires Plots.jl as an example that serves to drive the point home. For t…

---

## [Local bindings from stack trace?](https://discourse.julialang.org/t/local-bindings-from-stack-trace/104727)

<div class="topic-metadata">

**Author:** [@bertschi](https://discourse.julialang.org/u/bertschi)\
**Replies:** 0\
**Last updated:** [October 8, 2023, 8:01am UTC](https://discourse.julialang.org/t/local-bindings-from-stack-trace/104727 "2023-10-08T08:01:18Z")

</div>

Is it possible to get/recover the local variable bindings in a specific stack frame from a StackTrace? I know there is Base.@locals, but this just stores the local bindings at its specific call site. Thus, it doesn’t pr…

---

## [How to use an abstract type created in module A in module B](https://discourse.julialang.org/t/how-to-use-an-abstract-type-created-in-module-a-in-module-b/104635)

<div class="topic-metadata">

**Author:** [@Rafael\_Brus](https://discourse.julialang.org/u/Rafael_Brus)\
**Replies:** 6\
**Last updated:** [October 7, 2023, 10:48pm UTC](https://discourse.julialang.org/t/how-to-use-an-abstract-type-created-in-module-a-in-module-b/104635 "2023-10-07T22:48:42Z")

</div>

Hi, I created this code in Main: module PormG abstract type PormGAbstractType end abstract type SQLType \<: PormGAbstractType end mutable struct SQLQuery \<: SQLType model\_name::Union{String, Missing} ... end funct…

---

## [Using Base.Iterators for optimization, good idea?](https://discourse.julialang.org/t/using-base-iterators-for-optimization-good-idea/104717)

<div class="topic-metadata">

**Author:** [@bguillen](https://discourse.julialang.org/u/bguillen)\
**Replies:** 0\
**Last updated:** [October 7, 2023, 10:15pm UTC](https://discourse.julialang.org/t/using-base-iterators-for-optimization-good-idea/104717 "2023-10-07T22:15:34Z")

</div>

I implemented Hoare and Lomuto’s partitions with iterators. They behave as expected in terms of numbers of comparisons (N-1) and swaps (Hoare’s doing fewer than Lomuto’s). However the benchmarks are giving me same times…

---

## [A brief for Julia in Jupyter Notebook (in Turkish)](https://discourse.julialang.org/t/a-brief-for-julia-in-jupyter-notebook-in-turkish/104710)

<div class="topic-metadata">

**Author:** [@qneoxk](https://discourse.julialang.org/u/qneoxk)\
**Replies:** 0\
**Last updated:** [October 7, 2023, 7:47pm UTC](https://discourse.julialang.org/t/a-brief-for-julia-in-jupyter-notebook-in-turkish/104710 "2023-10-07T19:47:08Z")

</div>

Some basic applications for Julia with Jupyter Notebook https://github.com/qneoxk/Julia

---

## [How to use package extensions with Documenter.jl](https://discourse.julialang.org/t/how-to-use-package-extensions-with-documenter-jl/104704)

<div class="topic-metadata">

**Author:** [@Christopher\_Fisher](https://discourse.julialang.org/u/Christopher_Fisher)\
**Replies:** 4\
**Last updated:** [October 7, 2023, 8:55pm UTC](https://discourse.julialang.org/t/how-to-use-package-extensions-with-documenter-jl/104704 "2023-10-07T20:55:13Z")

</div>

When I test my documentation locally via LiveServer, Documenter recognizes functions in the extension in the @example macro block. However, the method is not found when the docs are built on Github. Is there a solution?

---

## [Workflow with redefining structs](https://discourse.julialang.org/t/workflow-with-redefining-structs/102982)

<div class="topic-metadata">

**Author:** [@Eben60](https://discourse.julialang.org/u/Eben60)\
**Replies:** 0\
**Last updated:** [August 19, 2023, 3:23pm UTC](https://discourse.julialang.org/t/workflow-with-redefining-structs/102982 "2023-08-19T15:23:55Z")

</div>

Continuing the discussion from Workflow challenges with redefining structs (from "Why I still recommend Julia"): I have decided to continue in a separate topic, but please see the linked post. So, I have now managed to …

---

## [Julia 1.9 vs 1.10 incompatibility](https://discourse.julialang.org/t/julia-1-9-vs-1-10-incompatibility/104708)

<div class="topic-metadata">

**Author:** [@PetrKryslUCSD](https://discourse.julialang.org/u/PetrKryslUCSD)\
**Replies:** 2\
**Last updated:** [October 7, 2023, 8:11pm UTC](https://discourse.julialang.org/t/julia-1-9-vs-1-10-incompatibility/104708 "2023-10-07T20:11:05Z")

</div>

This message comes up in 1.10 (1.9 is silent). the complaint is about a method from one module being overwritten in another. WARNING: Method definition inspectintegpoints(FEMM, FinEtools.NodalFieldModule.NodalField{Floa…

---

## [Is mine a genie.jl use case?](https://discourse.julialang.org/t/is-mine-a-genie-jl-use-case/104694)

<div class="topic-metadata">

**Author:** [@floswald](https://discourse.julialang.org/u/floswald)\
**Replies:** 4\
**Last updated:** [October 7, 2023, 6:30pm UTC](https://discourse.julialang.org/t/is-mine-a-genie-jl-use-case/104694 "2023-10-07T18:30:26Z")

</div>

hi all quick question for how people would address my use case. I have a google sheet where a human enters jobs to be done. I check the sheet once per day. I have another google sheet where I can see the availability …

---

## [Docstrings from package extensions in Documenter.jl](https://discourse.julialang.org/t/docstrings-from-package-extensions-in-documenter-jl/104690)

<div class="topic-metadata">

**Author:** [@April-Hannah-Lena](https://discourse.julialang.org/u/April-Hannah-Lena)\
**Replies:** 2\
**Last updated:** [October 7, 2023, 9:43am UTC](https://discourse.julialang.org/t/docstrings-from-package-extensions-in-documenter-jl/104690 "2023-10-07T09:43:28Z")

</div>

Say I have a package MyPackage module MyPackage """ Standard behavior. """ function do\_something(x::Vector) x .^ 3 end end # module with a CUDA extension: module CUDAExt import MyPackage: do\_something """ Spec…

---

## [How to define UInt256?](https://discourse.julialang.org/t/how-to-define-uint256/104688)

<div class="topic-metadata">

**Author:** [@tomtom](https://discourse.julialang.org/u/tomtom)\
**Replies:** 2\
**Last updated:** [October 7, 2023, 5:53am UTC](https://discourse.julialang.org/t/how-to-define-uint256/104688 "2023-10-07T05:53:36Z")

</div>

is there an efficient way to define a “big” unsigned integer type like UInt256? what things should I implement? don’t wanna use BigInt. thanks

---

## [How to create a single shared parameter for multiple gates within a circuit directly using Yao.jl?](https://discourse.julialang.org/t/how-to-create-a-single-shared-parameter-for-multiple-gates-within-a-circuit-directly-using-yao-jl/104648)

<div class="topic-metadata">

**Author:** [@nethaji8](https://discourse.julialang.org/u/nethaji8)\
**Replies:** 3\
**Last updated:** [October 7, 2023, 5:10am UTC](https://discourse.julialang.org/t/how-to-create-a-single-shared-parameter-for-multiple-gates-within-a-circuit-directly-using-yao-jl/104648 "2023-10-07T05:10:32Z")

</div>

I am trying to parameterize a circuit using a single variable θ in the code below but the output is: Number of parameters in the circuit: 4 . Can someone please help me create a single shared parameter for multiple g…

---

## [Avoid allocations for string concatenation](https://discourse.julialang.org/t/avoid-allocations-for-string-concatenation/104666)

<div class="topic-metadata">

**Author:** [@pjuergens](https://discourse.julialang.org/u/pjuergens)\
**Replies:** 5\
**Last updated:** [October 7, 2023, 3:35am UTC](https://discourse.julialang.org/t/avoid-allocations-for-string-concatenation/104666 "2023-10-07T03:35:14Z")

</div>

Hei together, I realised with the allocation profiler that our model allocates a lot when concatenating strings like "a" \* "b". Is there a way to avoid allocation in such cases? I tried with InternedStrings and intern("…

---

## [What is preventing these packages from upgrading](https://discourse.julialang.org/t/what-is-preventing-these-packages-from-upgrading/104618)

<div class="topic-metadata">

**Author:** [@Christopher\_Fisher](https://discourse.julialang.org/u/Christopher_Fisher)\
**Replies:** 7\
**Last updated:** [October 6, 2023, 1:47pm UTC](https://discourse.julialang.org/t/what-is-preventing-these-packages-from-upgrading/104618 "2023-10-06T13:47:37Z")

</div>

I have been experiencing a lot of package downgrades and version conflicts after adding FunctionZeros.jl to one of my projects. To investigate the matter further, I add FunctionZeros to a separate environment and examine…

---

## [Best practices for passing vector index in function](https://discourse.julialang.org/t/best-practices-for-passing-vector-index-in-function/104650)

<div class="topic-metadata">

**Author:** [@bguillen](https://discourse.julialang.org/u/bguillen)\
**Replies:** 3\
**Last updated:** [October 7, 2023, 12:43am UTC](https://discourse.julialang.org/t/best-practices-for-passing-vector-index-in-function/104650 "2023-10-07T00:43:54Z")

</div>

I’m making a bunch of partition and selection functions. In my use case I will always have vectors indexed by one, but given that offsetarray exists I wonder what would be a good signature for a function that takes an ar…

---

## [Solving a system of PDEs and defining equations](https://discourse.julialang.org/t/solving-a-system-of-pdes-and-defining-equations/104444)

<div class="topic-metadata">

**Author:** [@Reza\_AO](https://discourse.julialang.org/u/Reza_AO)\
**Replies:** 3\
**Last updated:** [October 6, 2023, 11:23pm UTC](https://discourse.julialang.org/t/solving-a-system-of-pdes-and-defining-equations/104444 "2023-10-06T23:23:00Z")

</div>

Hi I want to solve a system of equation with one PDE which is heat-diffusion equation and one ODE which is Arrhenius equation: eq = \[ρ\*Cp\*Dt(T(t,x,y)) ~ kx\*Dxx(T(t,x,y)) + ky\*Dyy(T(t,x,y)) - H\*W\*Dt(c(t,x,y)), -Dt(c…

---

## [PackageCompiler.jl and default header file creation](https://discourse.julialang.org/t/packagecompiler-jl-and-default-header-file-creation/104663)

<div class="topic-metadata">

**Author:** [@Allan\_Baker](https://discourse.julialang.org/u/Allan_Baker)\
**Replies:** 1\
**Last updated:** [October 6, 2023, 10:28pm UTC](https://discourse.julialang.org/t/packagecompiler-jl-and-default-header-file-creation/104663 "2023-10-06T22:28:56Z")

</div>

First time using package compiler to make a shared c library of julia functions for use in a larger C and C++ project. Initially I was thinking that the compile\_library function would be able to see all of the fancy @cc…

---

## [How to write an asynchronous version of the following code?](https://discourse.julialang.org/t/how-to-write-an-asynchronous-version-of-the-following-code/104657)

<div class="topic-metadata">

**Author:** [@Xiaoguang\_Pan](https://discourse.julialang.org/u/Xiaoguang_Pan)\
**Replies:** 4\
**Last updated:** [October 6, 2023, 4:54pm UTC](https://discourse.julialang.org/t/how-to-write-an-asynchronous-version-of-the-following-code/104657 "2023-10-06T16:54:38Z")

</div>

function parseFiles(inputFile::String,outFile::String) outf = open(outFile,"w") ### read in and process for line in eachline(inputFile) if startswith(line,"#") continue else …

---

## [Fastest way possible to find index of value equals 1 across a matrix column](https://discourse.julialang.org/t/fastest-way-possible-to-find-index-of-value-equals-1-across-a-matrix-column/104485)

<div class="topic-metadata">

**Author:** [@eduardosalaz](https://discourse.julialang.org/u/eduardosalaz)\
**Replies:** 7\
**Last updated:** [October 6, 2023, 4:32pm UTC](https://discourse.julialang.org/t/fastest-way-possible-to-find-index-of-value-equals-1-across-a-matrix-column/104485 "2023-10-06T16:32:06Z")

</div>

Hi there everyone. I am currently working on my thesis which involves an optimization problem in which I have an X decision matrix filled with 0s, each column must have a 1 value as it represents an allocation. In my lo…

---

## [Estimate memory requirements of ODE solver](https://discourse.julialang.org/t/estimate-memory-requirements-of-ode-solver/104567)

<div class="topic-metadata">

**Author:** [@Salmon](https://discourse.julialang.org/u/Salmon)\
**Replies:** 7\
**Last updated:** [October 6, 2023, 2:57pm UTC](https://discourse.julialang.org/t/estimate-memory-requirements-of-ode-solver/104567 "2023-10-06T14:57:02Z")

</div>

Hi everyone, I am solving a very large (~10^8) system of ODE’s. I would like to use the VCABM solver from ordinaryDiffEq since that seems to be fastest, but I have memory issues that I would like to understand better. I…

[Previous page](https://discourse.julialang.org/c/usage/6.md?page=239)

[Next page](https://discourse.julialang.org/c/usage/6.md?page=241)
