JuliaPlots / Plots.jl

Powerful convenience for Julia visualizations and data analysis
https://docs.juliaplots.org
Other
1.84k stars 358 forks source link

Plot doesn't render on JupyterLab with GR backend #1715

Closed roblesch closed 6 years ago

roblesch commented 6 years ago

I am new to Julia and following the quantecon materials. Trying to plot a simple sine function results in the following: image

I am on Ubuntu 18.04 running Julia 0.6.4. I is this possibly an issue of a missing dependency, or perhaps a Jupyter versioning issue? Let me know if there is a more appropriate place for discussion. Thank you.

roblesch commented 6 years ago

Plots show correctly on Jupyter notebooks, this issue only occurs when using JupyterLab. Updating issue title

mkborregaard commented 6 years ago

This is using the plotly backend? There is an issue with registering the plotly output in jupyter lab afaik

roblesch commented 6 years ago

This happens using the gr backend. Though thanks to your tip I was able to get it working with pyplot and plotly :smile:

mkborregaard commented 6 years ago

Oh - it works for me, though.

skaermbillede 2018-09-03 kl 23 40 39

Could you paste versioninfo() and ] st?

roblesch commented 6 years ago
Julia Version 0.6.4
Commit 9d11f62bcb (2018-07-09 19:09 UTC)
Platform Info:
  OS: Linux (x86_64-pc-linux-gnu)
  CPU: Intel(R) Core(TM) i7-7660U CPU @ 2.50GHz
  WORD_SIZE: 64
  BLAS: libopenblas (USE64BITINT DYNAMIC_ARCH NO_AFFINITY Haswell MAX_THREADS=16)
  LAPACK: libopenblas64_
  LIBM: libopenlibm
  LLVM: libLLVM-3.9.1 (ORCJIT, broadwell)

It doesn't seem that I can use ] st since I'm on 0.6.4, but here is the output of my Pkg.status():

7 required packages:
 - DataFrames                    0.11.7
 - Distributions                 0.15.0
 - IJulia                        1.10.0
 - PlotlyJS                      0.10.3
 - Plots                         0.17.4
 - PyPlot                        2.6.3
 - QuantEcon                     0.14.3
82 additional packages:
 - AbstractFFTs                  0.3.2
 - AssetRegistry                 0.0.2
 - BinDeps                       0.8.10
 - BinaryProvider                0.3.3
 - Blink                         0.7.0
 - Calculus                      0.4.1
 - CategoricalArrays             0.3.13
 - CodecZlib                     0.4.4
 - ColorTypes                    0.6.7
 - Colors                        0.8.2
 - CommonSubexpressions          0.1.0
 - Compat                        1.1.0
 - Conda                         1.0.1
 - Contour                       0.4.0
 - DSP                           0.5.1
 - DataStreams                   0.3.6
 - DataStructures                0.8.4
 - DiffEqDiffTools               0.4.1
 - DiffResults                   0.0.3
 - DiffRules                     0.0.7
 - DocStringExtensions           0.4.6
 - FFTW                          0.0.4
 - FixedPointNumbers             0.4.6
 - ForwardDiff                   0.7.5
 - FunctionalCollections         0.3.2
 - GR                            0.33.1
 - Hiccup                        0.1.1
 - HttpCommon                    0.4.0
 - HttpParser                    0.4.0
 - HttpServer                    0.3.1
 - JSExpr                        0.2.2
 - JSON                          0.17.2
 - LaTeXStrings                  1.0.2
 - Lazy                          0.12.1
 - LightGraphs                   0.12.0
 - LineSearches                  6.0.2
 - MacroTools                    0.4.4
 - MathProgBase                  0.7.5
 - MbedTLS                       0.5.12
 - Measures                      0.2.0
 - Missings                      0.2.10
 - Mustache                      0.3.3
 - Mux                           0.3.1
 - NLSolversBase                 6.1.1
 - NLopt                         0.3.6
 - NaNMath                       0.3.2
 - NamedTuples                   4.0.2
 - Nullables                     0.0.8
 - Observables                   0.1.2
 - Optim                         0.15.3
 - PDMats                        0.8.0
 - Parameters                    0.9.2
 - Pidfile                       1.0.0
 - PlotThemes                    0.2.0
 - PlotUtils                     0.4.4
 - PlotlyBase                    0.1.2
 - Polynomials                   0.4.0
 - PositiveFactorizations        0.1.0
 - Primes                        0.3.0
 - PyCall                        1.18.4
 - QuadGK                        0.3.0
 - RecipesBase                   0.3.1
 - Reexport                      0.1.0
 - Requires                      0.4.4
 - Rmath                         0.4.0
 - SHA                           0.5.7
 - Showoff                       0.2.1
 - SimpleTraits                  0.6.0
 - SoftGlobalScope               1.0.4
 - SortingAlgorithms             0.2.1
 - SpecialFunctions              0.6.0
 - StaticArrays                  0.7.2
 - StatsBase                     0.23.1
 - StatsFuns                     0.6.1
 - TranscodingStreams            0.5.4
 - URIParser                     0.3.1
 - VersionParsing                1.1.2
 - WeakRefStrings                0.4.7
 - WebIO                         0.2.6
 - WebSockets                    0.5.0
 - Widgets                       0.2.5
 - ZMQ                           0.6.4
mkborregaard commented 6 years ago

Ah it might be a version thing. I should say we're unlikely to push a fix that will work on 0.6, Plots is 1.x -only going forward.