Comments (7)
I am running Colors v0.12.10
which Pkg
does not tag for possible update or that it is being held back.
It is somewhat strange; when I run the command on a fresh session I cannot blow it up -VSCode just gives up on displaying the palette but it is still there (>20_000). But on my development context I get the overflow with just 150.
The exact command is run-of-the-mill colmap = colormap("Reds", maxcount; w=7, logscale = true)
where maxcount = 150
. I'm using Makie
for plotting of an animated choropleth and have on volatile very many data points but no processes running that would hijack the stack, to the best of my knowledge.
Please let me know what else I can do.
from colors.jl.
What was working? You didn't post the command that triggered the error.
from colors.jl.
Oh I see, it's essentially the title. But
julia> colormap("Blues", 5; w=7, logscale=false)
5-element Array{RGB{Float64},1} with eltype RGB{Float64}:
RGB{Float64}(1.0,0.9689444400515476,0.8339613400131303)
RGB{Float64}(0.7002333050365439,0.9232888688313844,0.5721953036991152)
RGB{Float64}(0.0,0.8116721169252812,0.7458361582969534)
RGB{Float64}(0.0,0.5087434882664857,0.7762718761091344)
RGB{Float64}(0.019190711289394265,0.15713212232170762,0.3484547991055406)
If you can post a reproducible example that would be a big help.
from colors.jl.
Hello Tim (hats off to you). I'm trying to define the color bar for a heatmap/choropleth based on some count and had recorded a maxcount
of 150 and I guess that blew the stack.
from colors.jl.
If you know the args that triggered this is seems to merit investigation. colormap("Blues", 150; w=7, logscale=false)
also works for me. (maxcount=150
does not sound excessive.)
Also, which version of Colors are you using? Line 326 does not contain a recursive call in the current master
branch:
Line 326 in f0a508b
from colors.jl.
Thanks very much for the concrete call. It still doesn't replicate for me BUT I think I figured it out based on the fact that your version is
Line 326 in da0045a
julia> colormap("Reds", 3; w=7, logscale = true)
3-element Array{RGB{Float64},1} with eltype RGB{Float64}:
RGB{Float64}(0.9582804535342538,0.958741006843247,0.9347144456966647)
RGB{Float64}(0.8905762771702996,0.9198617509685533,0.9659542256449846)
RGB{Float64}(0.42599527176569785,0.04573322950982179,0.03379128459010661)
julia> colormap("Reds", Int32(3); w=7, logscale = true)
ERROR: StackOverflowError:
Stacktrace:
[1] colormap(cname::String, args::Int32; kwargs::Base.Pairs{Symbol, Integer, Tuple{Symbol, Symbol}, NamedTuple{(:w, :logscale), Tuple{Int64, Bool}}}) (repeats 39992 times)
@ Colors ~/.julia/packages/Colors/mIuXl/src/colormaps.jl:326
The problem comes from specifying N
as an Integer that is not Int
: that line is supposed to dispatch to
Line 284 in da0045a
N
isn't an Int
.
That should let you work around it, but this is something we should fix. It already looks fixed on master
so maybe we should just focus on getting that out.
from colors.jl.
Got it. Thanks!
from colors.jl.
Related Issues (20)
- Not work on Ubuntu 2004 HOT 5
- RGB -> XTerm256 approximation? HOT 13
- move storage type conversion trait from ImageCore to Colors HOT 6
- Optimizing the types used for intermediate calculations HOT 5
- Source of the YIQ transform matrix HOT 1
- is `inv` on Colors well defined? HOT 4
- Fatal performance degradation due to precompilation or inference bugs HOT 8
- MethodError: no method matching coloralpha(::Type{RGB24}) HOT 1
- What should `default_brettel_neutral` be? HOT 1
- Ambiguity with AbstractTrees
- 'Render' colours in REPL HOT 15
- in the README, put a link on the home page HOT 2
- colorwheel generator HOT 1
- add colorwheel generator HOT 1
- Release v0.13? HOT 2
- Ambiguous show method for `Union{}[]` HOT 3
- oklab/oklch for CSS4 and cheap deltaE HOT 1
- BGR interpreted as RGB HOT 1
- Luv and LCHuv gives incorrect color values for low lightness cyan HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from colors.jl.