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

spy() produces empty plot on pyplot #1513

Closed
AzamatB opened this issue May 9, 2018 · 8 comments
Closed

spy() produces empty plot on pyplot #1513

AzamatB opened this issue May 9, 2018 · 8 comments

Comments

@AzamatB
Copy link

AzamatB commented May 9, 2018

using Plots, LinearAlgebra
gr()
spy(Matrix{Int}(I, 10, 10))

produces wrong output, namely image is not aligned with the axes. For comparison run this with plotly() backend, which plots this correctly.

Furthermore

using Plots
pyplot()
spy(Matrix{Int}(I, 10, 10))

simply plots zero matrix.

@AzamatB
Copy link
Author

AzamatB commented May 9, 2018

julia> versioninfo()
Julia Version 0.6.2
Commit d386e40* (2017-12-13 18:08 UTC)
Platform Info:
  OS: macOS (x86_64-apple-darwin15.6.0)
  CPU: Intel(R) Core(TM) i7-4770HQ CPU @ 2.20GHz
  WORD_SIZE: 64
  BLAS: libmkl_rt
  LAPACK: libmkl_rt
  LIBM: libopenlibm
  LLVM: libLLVM-3.9.1 (ORCJIT, haswell)

julia> Pkg.status("Plots")
 - Plots                         0.17.0

julia> Pkg.status("GR")
 - GR                            0.31.0

julia> Pkg.status("PyPlot")
 - PyPlot                        2.3.2

@AzamatB AzamatB changed the title spy produces incorrect plot spy() produces incorrect result May 9, 2018
@mkborregaard
Copy link
Member

Here's what I get:
gr:
skaermbillede 2018-05-09 kl 14 48 13

plotly:
skaermbillede 2018-05-09 kl 14 48 18

pyplot:
skaermbillede 2018-05-09 kl 14 48 26

So something is clearly amiss with pyplot - I don't see the GR problem though.

@AzamatB
Copy link
Author

AzamatB commented May 9, 2018

@mkborregaard what version of GR are you running? With 0.31 on Atom I get the following:
screen shot 2018-05-09 at 9 03 01 am

@mkborregaard
Copy link
Member

Yeah, we've had that before - yflip working on GR on most machines but not all. Sometimes different behaviour on the same operating system and version! What's your OS and version?

The GR issue is thus a duplicate of #1491

@mkborregaard mkborregaard changed the title spy() produces incorrect result spy() produces empty plot on pyplot May 9, 2018
@AzamatB
Copy link
Author

AzamatB commented May 9, 2018

macOS X version 10.13.4

@mkborregaard
Copy link
Member

So am I lol.

@mkborregaard
Copy link
Member

Any ideas, @jheinen ?

@Paethon
Copy link

Paethon commented Jun 15, 2018

This issue has been solved in GR.jl now with jheinen/GR.jl@b16a5da
(at least for me)
Not sure what has to be done so this fix is also used in Plots.jl

@t-bltg t-bltg closed this as completed Nov 24, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants