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] heatmap / xticks / xlims! error #3426

Closed
JeffFessler opened this issue Apr 9, 2021 · 2 comments
Closed

[BUG] heatmap / xticks / xlims! error #3426

JeffFessler opened this issue Apr 9, 2021 · 2 comments
Labels

Comments

@JeffFessler
Copy link
Contributor

JeffFessler commented Apr 9, 2021

Details

Running the first 3 lines of the following MWE, the heatmap displays fine.
But then the xlims! line causes a an error with a long output, first part of which is shown below.

using Plots
x = LinRange(-1,1,101)*4
heatmap(x, x, x*x', xticks=(-1:1)*maximum(x))
xlims!(-2,2)
Error showing value of type Plots.Plot{Plots.GRBackend}:
ERROR: InexactError: check_top_bit(UInt64, -9223372036854775481)
Stacktrace:
  [1] throw_inexacterror(f::Symbol, #unused#::Type{UInt64}, val::Int64)
    @ Core ./boot.jl:602

Removing the xticks option eliminates the error, so the issue is some coupling between xticks and xlims.
Change the 4 to a 2 and then it works!?
I searched issues for check_top_bit and found nothing that mentioned it...

Backends

This bug occurs on ( insert x below )

Backend yes no untested
gr (default) x
pyplot x
plotly x
plotlyjs x
pgfplotsx x
inspectdr x

Versions

Plots.jl version: v1.11.2
Backend version (]st -m): GR v0.57.1
Output of versioninfo():

Julia Version 1.6.0
Commit f9720dc2eb (2021-03-24 12:55 UTC)
Platform Info:
OS: macOS (x86_64-apple-darwin19.6.0)
CPU: Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz
WORD_SIZE: 64
LIBM: libopenlibm
LLVM: libLLVM-11.0.1 (ORCJIT, skylake)
Environment:
JULIA_NUM_THREADS = 8

@JeffFessler JeffFessler added the bug label Apr 9, 2021
@songhanzhang
Copy link

Exactly, I can reproduce the same issue. I have tried to define a different range for the x axis, or remove the command xticks = (-1:1)*maximum(x), and then it works fine. I guess that there might be a confliction between the defined xlims and xticks.

@JeffFessler
Copy link
Contributor Author

I just tried this with v1.15.2 and it worked fine, so closing the issue.

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

No branches or pull requests

2 participants