That's funny.  I edited my post twice, but it seems that the original 
unedited version hung around.  I don't know how that happened, but I'm 
sorry for the confusion.

On Wednesday, March 25, 2020 at 7:49:47 AM UTC-4, Edward K. Ream wrote:
>
> On Wednesday, March 25, 2020 at 6:33:23 AM UTC-5, Edward K. Ream wrote:
>
> I haven't yet figure out how to use holoviews. I copied the code shown, 
>> namely:
>>
>> import holoviews as hv
>> import holviews.util
>> hv.extension('matplotlib')
>> xs = range(-10, 11)
>> ys = [100-z**2 for z in xs]
>>
>> curve = hv.Curve((xs, ys))
>> plot = renderer.get_plot(curve).state
>> hv.save(curve, 'curve.png')
>>
>> Now I'm stuck. Neither reload nor execute creates curve.png.
>>
>
> To answer my own question, I should just execute this script, with 
> Ctrl-B.  However, renderer isn't defined, and isn't needed, so I just 
> deleted the line `plot = renderer.get_plot(curve).state`.
>
> But I'm still having troubles. Importing matplotlib directly does work, 
> but the last line here throws an exception:
>
> import holoviews as hv
> import holoviews.util
> hv.extension('matplotlib')
>
> Here is the exception:
>
> WARNING:param.notebook_extension: Holoviews matplotlib extension could not 
> be imported, it raised the following exception: FileNotFoundError('[WinError 
> 2] The system cannot find the file specified')
> exception executing script
>
>
> Traceback (most recent call last):
>
>   File "c:\leo.repo\leo-editor\leo\core\leoCommands.py", line 633, in 
> executeScript
>     c.executeScriptHelper(args, define_g, define_name, namespace, script)
>
>   File "c:\leo.repo\leo-editor\leo\core\leoCommands.py", line 672, in 
> executeScriptHelper
>     exec(compile(script, scriptFile, 'exec'), d)
>
>   File "C:/leo.repo/leo-editor/leo/test/scriptFile.py", line 6, in 
> <module>
>     hv.extension('matplotlib')
>
>   File 
> "C:\Users\edreamleo\Anaconda3\Lib\site-packages\param\parameterized.py", 
> line 2812, in __new__
>     return inst.__call__(*args,**params)
>
>   File 
> "C:\Users\edreamleo\Anaconda3\Lib\site-packages\holoviews\ipython\__init__.py"
> , line 116, in __call__
>     super(notebook_extension, self).__call__(*args, **params)
>
>   File 
> "C:\Users\edreamleo\Anaconda3\Lib\site-packages\holoviews\util\__init__.py"
> , line 710, in __call__
>     raise ImportError('None of the backends could be imported')
>
> ImportError: None of the backends could be imported
>
> Edward
>

-- 
You received this message because you are subscribed to the Google Groups 
"leo-editor" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to leo-editor+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/leo-editor/1bf65b2c-07ba-4b9c-b26a-c9d12c3b720e%40googlegroups.com.

Reply via email to