# Specific Domains

**URL:** https://discourse.julialang.org/c/domain/10.md?no_subcategories=false&page=370

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

**Page:** 371

---

## [Geom.contour in Gadfly.jl - How to use it?](https://discourse.julialang.org/t/geom-contour-in-gadfly-jl-how-to-use-it/60123)

<div class="topic-metadata">

**Author:** [@Adam\_Fleischhacker](https://discourse.julialang.org/u/Adam_Fleischhacker)\
**Replies:** 5\
**Last updated:** [April 28, 2021, 2:06pm UTC](https://discourse.julialang.org/t/geom-contour-in-gadfly-jl-how-to-use-it/60123 "2021-04-28T14:06:39Z")

</div>

I am trying to draw iso-density contours on a plot. Yet, it seems I am drawing lines all over the place – as opposed to contours representing different iso-densities (plot should be top-view of a mountain). I tried po…

---

## [Counting Value Occurences in Time Range in DataFrames](https://discourse.julialang.org/t/counting-value-occurences-in-time-range-in-dataframes/60097)

<div class="topic-metadata">

**Author:** [@TBulka](https://discourse.julialang.org/u/TBulka)\
**Replies:** 3\
**Last updated:** [April 28, 2021, 10:47am UTC](https://discourse.julialang.org/t/counting-value-occurences-in-time-range-in-dataframes/60097 "2021-04-28T10:47:08Z")

</div>

Hello everyone, say, I construct a data frame like this: using Dates using DataFrames datevec = collect(Date(2020, 02, 22):Day(1):Date(2020, 03, 03)) valuevec = \["A", "B", "A", "A", "C", "C", "A", "C", "A", "A", "B"\] …

---

## [Plot without updating limits](https://discourse.julialang.org/t/plot-without-updating-limits/60157)

<div class="topic-metadata">

**Author:** [@yakir12](https://discourse.julialang.org/u/yakir12)\
**Replies:** 3\
**Last updated:** [April 28, 2021, 10:32am UTC](https://discourse.julialang.org/t/plot-without-updating-limits/60157 "2021-04-28T10:32:08Z")

</div>

I want to plot a bunch of concentric circles but I don’t want them to update the limits of the axis. The idea is to show radial distance to some specific point. Any way I can do that? So instead of: I’d like to have…

---

## [How to invert variables in the objective of an optimization model](https://discourse.julialang.org/t/how-to-invert-variables-in-the-objective-of-an-optimization-model/60154)

<div class="topic-metadata">

**Author:** [@zlq178](https://discourse.julialang.org/u/zlq178)\
**Replies:** 2\
**Last updated:** [April 28, 2021, 10:16am UTC](https://discourse.julialang.org/t/how-to-invert-variables-in-the-objective-of-an-optimization-model/60154 "2021-04-28T10:16:38Z")

</div>

The optimization problem is： minimize log detP^−1 subject to ||Pu+ buro||\\2≤ 1, where P is a semidefinite matrix, buro is Variable, u is known. The code is: using Convex, SCS, LinearAlgebra if VERSION \< v"1.2.0-DEV.…

---

## [Colorbar and colsize](https://discourse.julialang.org/t/colorbar-and-colsize/60093)

<div class="topic-metadata">

**Author:** [@AshtonSBradley](https://discourse.julialang.org/u/AshtonSBradley)\
**Replies:** 7\
**Last updated:** [April 28, 2021, 10:00am UTC](https://discourse.julialang.org/t/colorbar-and-colsize/60093 "2021-04-28T10:00:51Z")

</div>

I can’t figure out how to make this plot. I want a column of Aspect(1,1) heatmaps down the left, with matching rectangle plots on the right that take up the space. I can get here fine: fig = Figure(resolution=(1192, 20…

---

## [Conditional inside a function to be optimized](https://discourse.julialang.org/t/conditional-inside-a-function-to-be-optimized/48563)

<div class="topic-metadata">

**Author:** [@danuzco](https://discourse.julialang.org/u/danuzco)\
**Replies:** 18\
**Last updated:** [April 28, 2021, 9:18am UTC](https://discourse.julialang.org/t/conditional-inside-a-function-to-be-optimized/48563 "2021-04-28T09:18:41Z")

</div>

I’m trying to maximize this function function C\_opt(s) pax, pby = OffsetArray( zeros(Float64, (2,2)), (0:1,0:1) ), OffsetArray( zeros(Float64, (2,2)), (0:1,0:1) ) Cmax = 0 for l=0:15 pax\[0,…

---

## [Constraint nonlinear problem](https://discourse.julialang.org/t/constraint-nonlinear-problem/60033)

<div class="topic-metadata">

**Author:** [@ohmsweetohm1](https://discourse.julialang.org/u/ohmsweetohm1)\
**Replies:** 7\
**Last updated:** [April 28, 2021, 8:04am UTC](https://discourse.julialang.org/t/constraint-nonlinear-problem/60033 "2021-04-28T08:04:23Z")

</div>

I have tried GalacticOptim.jl but I did not manage to get the constraints to work. using GalacticOptim, Optim using Plots rosenbrock(x, p) = (p\[1\] - x\[1\])^2 + p\[2\] \* (x\[2\] - x\[1\]^2)^2 x0 = zeros(2) p = \[1.0, 100.0\] c…

---

## [Unable to use PyPlot either in Jupyter notebook or in terminal](https://discourse.julialang.org/t/unable-to-use-pyplot-either-in-jupyter-notebook-or-in-terminal/60126)

<div class="topic-metadata">

**Author:** [@KK\_JuliaNoob](https://discourse.julialang.org/u/KK_JuliaNoob)\
**Replies:** 2\
**Last updated:** [April 28, 2021, 5:12am UTC](https://discourse.julialang.org/t/unable-to-use-pyplot-either-in-jupyter-notebook-or-in-terminal/60126 "2021-04-28T05:12:25Z")

</div>

I am on a Macbook pro with Big Sur, and I recently switched to Julia 1.6 When I tried to use the PyPlot package from a jupyter notebook, it keeps resetting the Julia kernel, and is unusable. Other Julia packages work fi…

---

## [\[ANN\] Quantikz.jl v1 for drawing circuits (including in-browser demos)](https://discourse.julialang.org/t/ann-quantikz-jl-v1-for-drawing-circuits-including-in-browser-demos/59911)

<div class="topic-metadata">

**Author:** [@Krastanov](https://discourse.julialang.org/u/Krastanov)\
**Replies:** 0\
**Last updated:** [April 24, 2021, 1:55am UTC](https://discourse.julialang.org/t/ann-quantikz-jl-v1-for-drawing-circuits-including-in-browser-demos/59911 "2021-04-24T01:55:32Z")

</div>

Demo at quantikz.krastanov.org. Library at github.com/Krastanov/Quantikz. Quantikz.jl now supports qubits, ancillas, classical bits, and arbitrary gates and measurements, conditional or not on both qubits and classical …

---

## [\`Chain\` vs \`foldl\` in Flux.jl](https://discourse.julialang.org/t/chain-vs-foldl-in-flux-jl/60136)

<div class="topic-metadata">

**Author:** [@dbg](https://discourse.julialang.org/u/dbg)\
**Replies:** 2\
**Last updated:** [April 28, 2021, 12:31am UTC](https://discourse.julialang.org/t/chain-vs-foldl-in-flux-jl/60136 "2021-04-28T00:31:01Z")

</div>

I am new to both ML and Julia, so this might be a silly question. I am trying to use foldl instead of Chain to create a model with multiple layers, but I am not able to train the model created using foldl. Does anyone kn…

---

## [Saving unicodeplots() to txt with color](https://discourse.julialang.org/t/saving-unicodeplots-to-txt-with-color/60069)

<div class="topic-metadata">

**Author:** [@mkarikom](https://discourse.julialang.org/u/mkarikom)\
**Replies:** 3\
**Last updated:** [April 27, 2021, 9:34pm UTC](https://discourse.julialang.org/t/saving-unicodeplots-to-txt-with-color/60069 "2021-04-27T21:34:59Z")

</div>

This is the solution I didn’t know I needed for quick and dirty hpc plotting. However, they only show up monochrome in #SBATCH --output. Therefore, I tried the following to explicitly save them and neither approach wor…

---

## [\[ANN\] OpenQASM.jl - the OpenQASM parser for Julia](https://discourse.julialang.org/t/ann-openqasm-jl-the-openqasm-parser-for-julia/60129)

<div class="topic-metadata">

**Author:** [@Roger-luo](https://discourse.julialang.org/u/Roger-luo)\
**Replies:** 1\
**Last updated:** [April 27, 2021, 9:04pm UTC](https://discourse.julialang.org/t/ann-openqasm-jl-the-openqasm-parser-for-julia/60129 "2021-04-27T21:04:17Z")

</div>

I’m excited to announce the OpenQASM parser in its 2.0 version: GitHub - QuantumBFS/OpenQASM.jl: Parsers and Tools for OpenQASM This package provides the functionality for parsing QASM scripts for Yao ecosystem, but you…

---

## [Plots.jl horizontal and vertical labels across subplots in grid layout](https://discourse.julialang.org/t/plots-jl-horizontal-and-vertical-labels-across-subplots-in-grid-layout/60113)

<div class="topic-metadata">

**Author:** [@goretkin](https://discourse.julialang.org/u/goretkin)\
**Replies:** 5\
**Last updated:** [April 27, 2021, 7:23pm UTC](https://discourse.julialang.org/t/plots-jl-horizontal-and-vertical-labels-across-subplots-in-grid-layout/60113 "2021-04-27T19:23:55Z")

</div>

using Plots n\_from = 2 n\_to = 3 froms = \[Plots.fakedata(100) for i = 1:n\_from\] tos = \[Plots.fakedata(100) for i = 1:n\_to\] gl = grid(n\_from + 1 , n\_to + 1) p = plot(;layout = gl, aspect\_ratio = 1.0) # setup subplots f…

---

## [Optimizing user-defined objective functions with no direct expression](https://discourse.julialang.org/t/optimizing-user-defined-objective-functions-with-no-direct-expression/60096)

<div class="topic-metadata">

**Author:** [@Fathya.Salih](https://discourse.julialang.org/u/Fathya.Salih)\
**Replies:** 1\
**Last updated:** [April 27, 2021, 6:48pm UTC](https://discourse.julialang.org/t/optimizing-user-defined-objective-functions-with-no-direct-expression/60096 "2021-04-27T18:48:40Z")

</div>

I have a Monte Carlo simulation that takes in a set of variables x1, x2, etc. and returns a number of counters that can be used to calculate the actual objective function f() I wanted to use JuMP to optimize the dimensi…

---

## [Explanation of Error related to memory](https://discourse.julialang.org/t/explanation-of-error-related-to-memory/60111)

<div class="topic-metadata">

**Author:** [@Sumanshekhar17](https://discourse.julialang.org/u/Sumanshekhar17)\
**Replies:** 0\
**Last updated:** [April 27, 2021, 3:19pm UTC](https://discourse.julialang.org/t/explanation-of-error-related-to-memory/60111 "2021-04-27T15:19:31Z")

</div>

Hi all, I am learning GPU programming and wanted to know what maximum grid size my machine can resolve so I went for a 1000x1000x500 grid and I got this error. Can you please explain what it is saying in easy words ERR…

---

## [QBase.jl v0.2.0 Release](https://discourse.julialang.org/t/qbase-jl-v0-2-0-release/59962)

<div class="topic-metadata">

**Author:** [@bdoolittle](https://discourse.julialang.org/u/bdoolittle)\
**Replies:** 6\
**Last updated:** [April 27, 2021, 2:20pm UTC](https://discourse.julialang.org/t/qbase-jl-v0-2-0-release/59962 "2021-04-27T14:20:57Z")

</div>

Hi Everyone, I’m excited to introduce QBase.jl as a base library for quantum information. The goal of QBase.jl is to provide a lightweight computational framework for quantum mechanics. This Julia package provides: V…

---

## [Can someone replicate this GLM problem with linear regression on your computer?](https://discourse.julialang.org/t/can-someone-replicate-this-glm-problem-with-linear-regression-on-your-computer/60098)

<div class="topic-metadata">

**Author:** [@Chen](https://discourse.julialang.org/u/Chen)\
**Replies:** 13\
**Last updated:** [April 27, 2021, 1:31pm UTC](https://discourse.julialang.org/t/can-someone-replicate-this-glm-problem-with-linear-regression-on-your-computer/60098 "2021-04-27T13:31:59Z")

</div>

The CSV file is here: https://github.com/JuliaStats/GLM.jl/files/6384056/Car-Training.csv The GLM issue that I reported is here: https://github.com/JuliaStats/GLM.jl/issues/426 The codes are very simple: using GLM usi…

---

## [Error in PDE Example](https://discourse.julialang.org/t/error-in-pde-example/60040)

<div class="topic-metadata">

**Author:** [@mihalybaci](https://discourse.julialang.org/u/mihalybaci)\
**Replies:** 4\
**Last updated:** [April 27, 2021, 1:31pm UTC](https://discourse.julialang.org/t/error-in-pde-example/60040 "2021-04-27T13:31:21Z")

</div>

I’m trying to follow the example for solving the heat equation PDE from the DiffEqOperators page, but I am running into an error in the discretization step. The code is using OrdinaryDiffEq, ModelingToolkit, DiffEqOpera…

---

## [Subplots with one common legend](https://discourse.julialang.org/t/subplots-with-one-common-legend/60020)

<div class="topic-metadata">

**Author:** [@dmetivie](https://discourse.julialang.org/u/dmetivie)\
**Replies:** 3\
**Last updated:** [April 27, 2021, 9:48am UTC](https://discourse.julialang.org/t/subplots-with-one-common-legend/60020 "2021-04-27T09:48:17Z")

</div>

I am trying to plot many subplots with one common legend that is not on the subplots but in between the two subplot rows where it is empty. Moreover, it should not enlarge the space between the row and make the plot unne…

---

## [Loading .csv into a DataFrame with missing insertion and column-type correction (one-linerish)](https://discourse.julialang.org/t/loading-csv-into-a-dataframe-with-missing-insertion-and-column-type-correction-one-linerish/60088)

<div class="topic-metadata">

**Author:** [@egolep](https://discourse.julialang.org/u/egolep)\
**Replies:** 1\
**Last updated:** [April 27, 2021, 9:02am UTC](https://discourse.julialang.org/t/loading-csv-into-a-dataframe-with-missing-insertion-and-column-type-correction-one-linerish/60088 "2021-04-27T09:02:36Z")

</div>

Hi, forgive me if the question is trivial or if there have been similar or identical questions already answered, but I’ve not been able to find them. I have to load a .csv file into a DataFrame, but the file contains “…

---

## [Hiding decorations in a 3D scene](https://discourse.julialang.org/t/hiding-decorations-in-a-3d-scene/60067)

<div class="topic-metadata">

**Author:** [@LarryLegend33](https://discourse.julialang.org/u/LarryLegend33)\
**Replies:** 1\
**Last updated:** [April 27, 2021, 6:24am UTC](https://discourse.julialang.org/t/hiding-decorations-in-a-3d-scene/60067 "2021-04-27T06:24:38Z")

</div>

Hi, I’m using the wireframe plotting method to render some meshes and having success rotating the meshes as visual stimuli for psychophysics experiments. I’d like to hide the decorations of all axes so that the only thi…

---

## [Plots grid line at every integer or half integer](https://discourse.julialang.org/t/plots-grid-line-at-every-integer-or-half-integer/60059)

<div class="topic-metadata">

**Author:** [@goretkin](https://discourse.julialang.org/u/goretkin)\
**Replies:** 2\
**Last updated:** [April 26, 2021, 10:43pm UTC](https://discourse.julialang.org/t/plots-grid-line-at-every-integer-or-half-integer/60059 "2021-04-26T22:43:40Z")

</div>

Is there a way to specify Plots.jl to have a grid line at every integer without manually listing the integers? I want grid lines based on the plot extent, without calculating the extent beforehand (since Plots.jl will do…

---

## [Flux and chemistry](https://discourse.julialang.org/t/flux-and-chemistry/59742)

<div class="topic-metadata">

**Author:** [@aquarelleX332](https://discourse.julialang.org/u/aquarelleX332)\
**Replies:** 4\
**Last updated:** [April 26, 2021, 10:42pm UTC](https://discourse.julialang.org/t/flux-and-chemistry/59742 "2021-04-26T22:42:02Z")

</div>

Hello everyone, I am aware that ChemometricsTools.jl is a machine learning library for chemistry (mainly to process chemical data). Could you help me to find some examples of Flux application in chemistry (and possibl…

---

## [Avoiding loops in Turing](https://discourse.julialang.org/t/avoiding-loops-in-turing/59830)

<div class="topic-metadata">

**Author:** [@owensnick](https://discourse.julialang.org/u/owensnick)\
**Replies:** 7\
**Last updated:** [April 26, 2021, 3:10pm UTC](https://discourse.julialang.org/t/avoiding-loops-in-turing/59830 "2021-04-26T15:10:32Z")

</div>

I’m learning Turing. Can anyone help explain the following, I define two (hopefully) equivalent models one with loops and one without, the loop model is 50x slower, but actually produces useful results. This is a reduced…

---

## [How to determine whenever there's an oscillation](https://discourse.julialang.org/t/how-to-determine-whenever-theres-an-oscillation/48936)

<div class="topic-metadata">

**Author:** [@Torkel](https://discourse.julialang.org/u/Torkel)\
**Replies:** 23\
**Last updated:** [April 26, 2021, 2:22pm UTC](https://discourse.julialang.org/t/how-to-determine-whenever-theres-an-oscillation/48936 "2021-04-26T14:22:53Z")

</div>

Hello, I am looking for some advice: I have a system that I am investigating, and I am trying to determine for which parameter values it exhibits which behaviours. There are several different ones, but a typical is that…

---

## [Writing data to csv](https://discourse.julialang.org/t/writing-data-to-csv/59670)

<div class="topic-metadata">

**Author:** [@ashwanimalviya](https://discourse.julialang.org/u/ashwanimalviya)\
**Replies:** 27\
**Last updated:** [April 26, 2021, 2:11pm UTC](https://discourse.julialang.org/t/writing-data-to-csv/59670 "2021-04-26T14:11:01Z")

</div>

Hi Guys, I am working with data set and writing my results back to the csv file. my code is Result = \[permutedims(Names); K2Score; ShortestPath; score; cum\_weight\] save\_file = save\_dialog("Save Hierarchy as...") CSV.wri…

---

## [Using DynamicHMC to calculate paths of Quantum Simple Harmonic Oscillator](https://discourse.julialang.org/t/using-dynamichmc-to-calculate-paths-of-quantum-simple-harmonic-oscillator/60009)

<div class="topic-metadata">

**Author:** [@jdhooghe](https://discourse.julialang.org/u/jdhooghe)\
**Replies:** 2\
**Last updated:** [April 26, 2021, 11:54am UTC](https://discourse.julialang.org/t/using-dynamichmc-to-calculate-paths-of-quantum-simple-harmonic-oscillator/60009 "2021-04-26T11:54:33Z")

</div>

Hello, I need some help getting sampling to work using DynamicHMC. The model thus far is: using LogDensityProblems using Statistics using Distributions using UnPack using TransformVariables using DynamicHMC using MCMCDi…

---

## [Dash clientside callbacks](https://discourse.julialang.org/t/dash-clientside-callbacks/59886)

<div class="topic-metadata">

**Author:** [@Iulian.Cioarca](https://discourse.julialang.org/u/Iulian.Cioarca)\
**Replies:** 3\
**Last updated:** [April 26, 2021, 10:51am UTC](https://discourse.julialang.org/t/dash-clientside-callbacks/59886 "2021-04-26T10:51:01Z")

</div>

Is there an example of clientside callbacks for Dash? I only found this, hidden in a closed github issue: https://github.com/plotly/Dash.jl/pull/30 I tried with this code, but it doesn’t work: using Dash, DashHtmlCompo…

---

## [Solver argument (MosekModel) must be an AbstractMathProgSolver](https://discourse.julialang.org/t/solver-argument-mosekmodel-must-be-an-abstractmathprogsolver/59967)

<div class="topic-metadata">

**Author:** [@zlq178](https://discourse.julialang.org/u/zlq178)\
**Replies:** 6\
**Last updated:** [April 26, 2021, 7:20am UTC](https://discourse.julialang.org/t/solver-argument-mosekmodel-must-be-an-abstractmathprogsolver/59967 "2021-04-26T07:20:33Z")

</div>

This is an SDP problem or Mosek problem. using JuMP, Mosek, Plots, MosekTools # 生成一个200x200的稠密随机对称矩阵Q Q = randn(200,200) Q = Q + Q' # 负责进行抽样实验的函数 function SampleBQP(Q,N) naive\_fval = zeros(N,1) GW\_fval = zeros(N…

---

## [Single Transferable Vote by Meek's Method](https://discourse.julialang.org/t/single-transferable-vote-by-meeks-method/59701)

<div class="topic-metadata">

**Author:** [@Nosferican](https://discourse.julialang.org/u/Nosferican)\
**Replies:** 4\
**Last updated:** [April 26, 2021, 2:42am UTC](https://discourse.julialang.org/t/single-transferable-vote-by-meeks-method/59701 "2021-04-26T02:42:43Z")

</div>

Algorithm 123 — SINGLE TRANSFERABLE VOTE BY MEEK’S METHOD Thinking of working on this as a weekend project. Anyone has interest or suggestions for the implementation?

[Previous page](https://discourse.julialang.org/c/domain/10.md?no_subcategories=false&page=369)

[Next page](https://discourse.julialang.org/c/domain/10.md?no_subcategories=false&page=371)
