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

figure(), imagesc() vs figure(); imagesc() #147

Closed
cmey opened this issue May 2, 2014 · 3 comments
Closed

figure(), imagesc() vs figure(); imagesc() #147

cmey opened this issue May 2, 2014 · 3 comments

Comments

@cmey
Copy link
Contributor

cmey commented May 2, 2014

Hi,
reporting a small problem:

using Winston
# note the difference of using , instead of ;
figure(); imagesc(rand(4,4)) # OK, displays image
figure(), imagesc(rand(4,4)) # FAILS, displays only the window with empty content (no image displayed), same result as if only figure() had been called

It happens both in script and at the REPL.
This is on latest Julia prerelease snapshot for Win 7 32 bits :

julia> versioninfo()
Julia Version 0.3.0-prerelease+2809
Commit d1095bb* (2014-04-28 22:41 UTC)
Platform Info:
  System: Windows (i686-w64-mingw32)
  CPU: Intel(R) Core(TM) i5 CPU       M 560  @ 2.67GHz
  WORD_SIZE: 32
  BLAS: libopenblas (DYNAMIC_ARCH NO_AFFINITY)
  LAPACK: libopenblas
  LIBM: libopenlibm

and latest Winston:

julia> Pkg.installed("Winston")
v"0.11.0"

I report this to Winston because the following works as expected in Base Julia:

julia> versioninfo(), versioninfo()
Julia Version 0.3.0-prerelease+2809
Commit d1095bb* (2014-04-28 22:41 UTC)
Platform Info:
  System: Windows (i686-w64-mingw32)
  CPU: Intel(R) Core(TM) i5 CPU       M 560  @ 2.67GHz
  WORD_SIZE: 32
  BLAS: libopenblas (DYNAMIC_ARCH NO_AFFINITY)
  LAPACK: libopenblas
  LIBM: libopenlibm
Julia Version 0.3.0-prerelease+2809
Commit d1095bb* (2014-04-28 22:41 UTC)
Platform Info:
  System: Windows (i686-w64-mingw32)
  CPU: Intel(R) Core(TM) i5 CPU       M 560  @ 2.67GHz
  WORD_SIZE: 32
  BLAS: libopenblas (DYNAMIC_ARCH NO_AFFINITY)
  LAPACK: libopenblas
  LIBM: libopenlibm
(nothing,nothing)

and also with strings:

julia> "hello","world"
("hello","world")

i.e. it prints both elements as expected (in the REPL), regardless of , or ;

After reading http://winston.readthedocs.org/en/latest/faq.html#why-is-nothing-displayed-when-i-call-plot-in-a-script I note that it might actually be the opposite problem: it should not display anything until a call to display() to be consistent?

@nolta
Copy link
Member

nolta commented May 2, 2014

Hmm, i'm not sure forcing people to write display(figure()) in scripts would make anyone happy.

@cmey
Copy link
Contributor Author

cmey commented May 6, 2014

Agreed,
that's currently the case : I have to write figure(); h = imagesc(...); display(h) everywhere.
Why not display automatically ?

@cmey
Copy link
Contributor Author

cmey commented Sep 25, 2021

Closing this as this makes sense as it is. The explanation is using , returns a Tuple.

@cmey cmey closed this as completed Sep 25, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants