pythonpython-3.xspyderholoviews

Why doesn't holoviews show histogram in Spyder?


I have Anaconda 3.7 installed on Windows. It works in Jupyter but not in Spyder. This code:

import holoviews as hv
import pandas as pd
import numpy as np
output_notebook ()
flora = pd.read_csv ('iris.csv')
hv.extension('bokeh')
frequencies, edges = np.histogram(flora['petal width'], bins = 5)
print(frequencies, edges)
hv.Histogram(frequencies, edges, label = 'Histogram')

returns only values:

[49  8 41 29 23] [0.1  0.58 1.06 1.54 2.02 2.5 ]
WARNING:root:Histogram: Histogram edges should be supplied as a tuple along with the values, passing the edges will be deprecated in holoviews 2.0.

Is it possible to see histogram in Spyder?


Solution

  • (Spyder maintainer here) Holoviews produces content to be rendered in a web browser and Spyder consoles are not able to display that content at the moment, sorry.