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

Faq updates #2941

Merged
merged 10 commits into from
Aug 17, 2018
Merged

Faq updates #2941

merged 10 commits into from
Aug 17, 2018

Conversation

jbednar
Copy link
Member

@jbednar jbednar commented Aug 15, 2018

Minor updates.

@jbednar
Copy link
Member Author

jbednar commented Aug 15, 2018

@ahuang11, does this existing FAQ answer address any of what you were proposing in Q: How can I access all the options that aren't exposed in HoloViews, but are available in the backend??

  from holoviews import Store
  Store.add_style_opts(Image, ['filternorm'], backend='matplotlib')

(Or should this bit be combined with yours?)

@ahuang11
Copy link
Collaborator

ahuang11 commented Aug 15, 2018

Ah, I wasn't aware of that, but that's pretty neat!

For the question Q: How can I access all the options that aren't exposed in HoloViews, but are available in the backend?, I used finalize_hooks / final_hooks in the answer because it can be applied to more cases. For instance one example from gitter:

"I need plain integer number on x/y axis labels rather than scientific notation. How can I format the axes ?"

def _add_int_axis(plot, element):
    p = plot.state
    axis = p.xaxis[0]
    axis.ticker = FixedTicker(ticks=list(range(0, 10)))

hv_obj.options(finalize_hooks=[_add_int_axis])

However, I believe your answer is more suited for the question, and maybe my answer of using finalize_hooks can be put somewhere else?

One suggestion for the copyable code:

import holoviews as hv
from holoviews import Store

hv.extension('matplotlib')
Store.add_style_opts(hv.Image, ['filternorm'], backend='matplotlib')

So it works without it complaining Image is not defined and KeyError: 'matplotlib'

@ahuang11
Copy link
Collaborator

ahuang11 commented Aug 16, 2018

Nevermind about below; can't have consecutive .. code:: python blocks.
Also, I noticed some of the code is not showing up in the preview, but I can't find what's different about this code block from other ones...

image

image

@jbednar
Copy link
Member Author

jbednar commented Aug 16, 2018

@ahuang11 , I think I addressed your suggestions; can you please see if that's now clearer?

doc/FAQ.rst Outdated
**Q: What I want to change is about how HoloViews works, not about the
underlying backend. Is that possible?**

Sure, if you need more customization and configurability than is
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think missing **A:**

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed, thanks!

@ahuang11
Copy link
Collaborator

Yes, it looks great! Thanks!

One additional suggestion I have; we probably should try our best to sort the FAQ by how frequent they're actually asked so that newer users don't have to read through the entire doc to find what they're looking for.

@jbednar
Copy link
Member Author

jbednar commented Aug 16, 2018

Right; the order is quite random right now. Ok, let's merge this one and then if you'd like to take a stab at identifying which are the most common questions and put those first, that can be a separate PR where it's just moving things around rather than adding new content.

@ahuang11
Copy link
Collaborator

ahuang11 commented Aug 16, 2018 via email

@jbednar jbednar merged commit 929adcd into master Aug 17, 2018
@jbednar jbednar deleted the faq-updates branch August 17, 2018 13:05
philippjfr pushed a commit that referenced this pull request Oct 25, 2018
Copy link

This pull request has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Oct 24, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants