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] src/layouts.jl floating point equality too strict #4971

Closed
penelopeysm opened this issue Aug 21, 2024 · 1 comment · Fixed by #4972
Closed

[BUG] src/layouts.jl floating point equality too strict #4971

penelopeysm opened this issue Aug 21, 2024 · 1 comment · Fixed by #4972
Labels

Comments

@penelopeysm
Copy link
Contributor

Details

#4902 introduces a check on the sum of heights and widths in a plot layout.

Plots.jl/src/layouts.jl

Lines 229 to 232 in 8b9bcf2

if widths !== nothing
if sum(widths) != 1
error("The sum of widths must be 1!")
end

It's a bit too strict, though, which led to TuringLang/MCMCChains.jl#457 — our plot recipe generates widths of [0.3, 0.3, 0.3, 0.1] which don't add up to 1.

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)>): v0.73.7
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 Pro
  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_FALLBACK_LIBRARY_PATH = /Users/pyong/.julia/artifacts/5902919ba30b97bafa388ca950a351ea32516d26/lib:/Users/pyong/.julia/artifacts/92b949e2f3a66439c69a8d334fc95810fbd9df9b/lib:/Users/pyong/.julia/artifacts/5b338c8fa90c05e6faea86e54d2996cca76cfbbe/lib:/Users/pyong/.julia/juliaup/julia-1.10.4+0.aarch64.apple.darwin14/lib/julia:/Users/pyong/.julia/artifacts/b8f5da6f57c2e2fc6e975f48076310a72e239e66/lib:/Users/pyong/.julia/artifacts/9410bad2635eda2239b4a72ba4316c4aa8f5b76e/lib:/Users/pyong/.julia/artifacts/e04c23df67d77af61db2b9bfb82096c50c14346d/lib:/Users/pyong/.julia/artifacts/807b3a94123d30a6923d6d303e22f466233a4ea6/lib:/Users/pyong/.julia/artifacts/07e6bd5ae846b525d0c43be96788967cfccb923b/lib:/Users/pyong/.julia/artifacts/e8b17d4e8df51de281bf55f890ba48f924e41ce3/lib:/Users/pyong/.julia/artifacts/8408d0a22293bf477615b4ae706ede8df2b6367e/lib:/Users/pyong/.julia/artifacts/b53d3c68aa0812e5ae574464a3198d17d79ded1a/lib:/Users/pyong/.julia/artifacts/bb74171086b39a991ff3f12027bdf216d0fe9bd3/lib:/Users/pyong/.julia/artifacts/65d6651eacd881039e256d64c458d1ebd0101013/lib:/Users/pyong/.julia/artifacts/a6b6a73123c51d64fc30aa1caf34364bacf0f8a5/lib:/Users/pyong/.julia/artifacts/3b3d0bcaf14a9b239a4f4dc20ef7b9e63030a47e/lib:/Users/pyong/.julia/artifacts/abf161ac3d4df76ae74bbf5432b7e061b3876236/lib:/Users/pyong/.julia/artifacts/4260cf51a368d8e305a5de3669e32539e1e6cc72/lib:/Users/pyong/.julia/artifacts/fc7ba632b72ce7d852c1924aa2bbfe244a71c780/lib:/Users/pyong/.julia/artifacts/115f3a18328d7b88e31c9e3f095aeb12eb381710/lib:/Users/pyong/.julia/artifacts/ca2831bf6edc5088aec5b329ea98364951d6cad0/lib:/Users/pyong/.julia/artifacts/477447566a69a531a7a3f8e0130cbfe460b37eec/lib:/Users/pyong/.julia/artifacts/8aeda74365ddd4a5b4b857356622b5c7612a3f2e/lib:/Users/pyong/.julia/artifacts/0db9c3f6cf936a0da49e2ba954ba3e10bed6ad72/lib:/Users/pyong/.julia/artifacts/1a7e22e66b523d9cb884cf85c3ec065b5fb3e5c3/lib:/Users/pyong/.julia/artifacts/2c629d59cfe52761e7b0760dcc1df5f1d43c3907/lib:/Users/pyong/.julia/artifacts/4609432e7098d8434a7a4c7876dd5b9e09b2a5e7/lib:/Users/pyong/.julia/artifacts/6095fcd268ea712c0f786f5ff1a45bf0eb7b005e/lib:/Users/pyong/.julia/artifacts/b17b8d5c7b4a2b9d0d81352efc80ce5b9da2553e/lib:/Users/pyong/.julia/artifacts/6b104f71c6fc2280dea4cd195cb6800737e8c9aa/lib:/Users/pyong/.julia/artifacts/b450526929615030746974fd622effa333c2c87a/lib:/Users/pyong/.julia/artifacts/fb653fdc268e50c0be4391f6ca2f2fce2be7f15b/lib:/Users/pyong/.julia/artifacts/3908ba61f3e144a7e7e28b9d676ca770f2f6a955/lib:/Users/pyong/.julia/artifacts/2107e7bc404f11b178cb9724cb371ef704995727/lib:/Users/pyong/.julia/artifacts/4b3b2d79556cc3aef6e3d8a234649cc85b91bb87/lib:/Users/pyong/.julia/artifacts/7f2122f84c49e5b75c5b4cbf46bbdeb3b0ffc5da/lib/QtConcurrent.framework/Versions/A:/Users/pyong/.julia/artifacts/7f2122f84c49e5b75c5b4cbf46bbdeb3b0ffc5da/lib/QtCore.framework/Versions/A:/Users/pyong/.julia/artifacts/7f2122f84c49e5b75c5b4cbf46bbdeb3b0ffc5da/lib/QtDBus.framework/Versions/A:/Users/pyong/.julia/artifacts/7f2122f84c49e5b75c5b4cbf46bbdeb3b0ffc5da/lib/QtGui.framework/Versions/A:/Users/pyong/.julia/artifacts/7f2122f84c49e5b75c5b4cbf46bbdeb3b0ffc5da/lib/QtNetwork.framework/Versions/A:/Users/pyong/.julia/artifacts/7f2122f84c49e5b75c5b4cbf46bbdeb3b0ffc5da/lib/QtOpenGL.framework/Versions/A:/Users/pyong/.julia/artifacts/7f2122f84c49e5b75c5b4cbf46bbdeb3b0ffc5da/lib/QtPrintSupport.framework/Versions/A:/Users/pyong/.julia/artifacts/7f2122f84c49e5b75c5b4cbf46bbdeb3b0ffc5da/lib/QtSql.framework/Versions/A:/Users/pyong/.julia/artifacts/7f2122f84c49e5b75c5b4cbf46bbdeb3b0ffc5da/lib/QtTest.framework/Versions/A:/Users/pyong/.julia/artifacts/7f2122f84c49e5b75c5b4cbf46bbdeb3b0ffc5da/lib/QtWidgets.framework/Versions/A:/Users/pyong/.julia/artifacts/7f2122f84c49e5b75c5b4cbf46bbdeb3b0ffc5da/lib/QtXml.framework/Versions/A:/Users/pyong/.julia/artifacts/9cbd4bb5d69dad27b1c39fa28580935bfd0dc196/lib:/Users/pyong/.julia/juliaup/julia-1.10.4+0.aarch64.apple.darwin14/bin/../lib/julia:/Users/pyong/.julia/juliaup/julia-1.10.4+0.aarch64.apple.darwin14/bin/../lib:
@penelopeysm
Copy link
Contributor Author

Oopsies, duplicate of #4959.

Working on PR now anyway!

@penelopeysm penelopeysm closed this as not planned Won't fix, can't repro, duplicate, stale Aug 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant