question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

cellmagic output and options parsing problem

See original GitHub issue
#%%output backend='matplotlib'
def rectangle(x=0, y=0, width=.05, height=.05):
    return np.array([(x,y), (x+width, y), (x+width, y+height), (x, y+height)])

hv.Polygons(rectangle()).opts([ hv.opts.Polygons(color='indianred',line_alpha=.5, padding=2, backend='bokeh'),
                                hv.opts.Polygons(color='lightblue', padding=2, backend='matplotlib')])

works as expected. Uncommenting the output backend cell magic results in WARNING:root:main: Option 'line_alpha' for Polygons type not valid for selected backend ('matplotlib'). Option only applies to following backends: ['bokeh'] in hv 1.11.2.post3+ged1cc85a3

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:23 (23 by maintainers)

github_iconTop GitHub Comments

2reactions
philippjfrcommented, Feb 3, 2019

Even if you just build a hv.Options object and supply that?

Sure, but that’s another thing to document and introduce to users, if we can avoid making exceptions here that’d be preferable.

This could be possible if hv.Options gets a _backend attribute that the opts method checks for and uses. I don’t really see much of an issue with this, it just hasn’t been implemented yet.

If you’re on board with this then I think we all agree that’s the best solution.

1reaction
jlstevenscommented, Feb 19, 2019

@ea42gh To make sure, I can confirm your original example above now works as expected.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Tutorial: Advanced Jupyter Notebooks - Dataquest
Parsing dates is definitely less intuitive than other common data types, but as usual there are several options in Python.
Read more >
Parsing Args in Jupyter Notebooks - YouTube
Developing Linux/Unix-like commands from a Jupyter Notebook that can be scheduled? No problem ! That's what we're up to in this series of ......
Read more >
latex jupyter notebook it does not work - Stack Overflow
To fix the problem, I just saved my notebook, stopped the python kernel, closed the notebook in the browser, then re-opened it again...
Read more >
Applicative Options Parsing in Haskell - Thoughtbot
I've just finished work on a small command line client for the Heroku Build API written in Haskell. It may be a bit...
Read more >
5 Magic Fixes for the Most Common CSV File reader Problems
You've got four options to fix this: 1. You can open the file in a text reader and save it again with the...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found