Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] grid checks sum to 1 but fails due to numerical approximation. #4959

Closed
ignacioq opened this issue Jul 10, 2024 · 0 comments · Fixed by #4972
Closed

[BUG] grid checks sum to 1 but fails due to numerical approximation. #4959

ignacioq opened this issue Jul 10, 2024 · 0 comments · Fixed by #4972

Comments

@ignacioq
Copy link

Details

This gives command to be used in layout: grid(4, 2, heights=[0.3, 0.3, 0.3, 0.1]), returns an error because, due to numerical approximation, it does not literally sum up to one.: ERROR: The sum of heights must be 1!.

I tried this: grid(4, 2, heights=[0.3, 0.3, 0.3, 0.1 + 1e-16]) and now works, but would be nice to make an approximate comparison.

Backends

This bug occurs on ( insert x below )

Backend yes no untested
gr (default) x
pythonplot x
plotlyjs x
pgfplotsx x
unicodeplots x
inspectdr x
gaston x

Versions

Plots.jl version: v1.40.5
Backend version (]st -m <backend(s)>): GR v0.73.5
Output of versioninfo():
Julia Version 1.10.4
Commit 48d4fd48430 (2024-06-04 10:41 UTC)
Build Info:
Official https://julialang.org/ release
Platform Info:
OS: macOS (arm64-apple-darwin22.4.0)
CPU: 10 × Apple M1 Max
WORD_SIZE: 64
LIBM: libopenlibm
LLVM: libLLVM-15.0.7 (ORCJIT, apple-m1)
Threads: 1 default, 0 interactive, 1 GC (on 8 virtual cores)
Environment:
DYLD_LIBRARY_PATH = /boost_1_60_0/stage/lib:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants