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.

opts for inverting individual axes does not seem to work, e.g. opts(invert_yaxis=True) for holoviews and hvplot

See original GitHub issue

I notice that opts for inverting individual axes does not seem to work in latest version hvplot and holoviews (see below), e.g. opts(invert_yaxis=True) for holoviews and hvplot

ALL software version info

# imports
import holoviews as hv
import hvplot.pandas
from holoviews import opts
import pandas as pd
import numpy as np
import bokeh
import panel as pn

libs = [hv, pd, hvplot, np, bokeh, pn] libs_version = {} for lib in libs: print(lib.version) libs_version[lib.name] = lib.version`

{‘holoviews’: ‘1.14.0’, ‘pandas’: ‘0.24.2’, ‘hvplot’: ‘0.7.0’, ‘numpy’: ‘1.16.5’, ‘bokeh’: ‘2.2.3’, ‘panel’: ‘0.10.2’}

Description of expected behavior and the observed behavior

I have been using opts for holoviews elements in order to e.g. invert yaxis vy setting invert_yaxis=True. This has been working before, but not after I just ran

conda update -c pyviz holoviz

Minimal, self-contained example code

# imports
import holoviews as hv
import hvplot.pandas
from holoviews import opts
import pandas as pd
import numpy as np

# make dataset
df = pd.DataFrame(dict(A= np.random.rand(10,),
                       B=2.5 + np.random.rand(10,)))
# hvplot example
plot_hvplot = df[['A', 'B']].hvplot.scatter(x='A', y='B').opts(invert_yaxis=True)

# holoviews example
plot_holoviews = hv.Scatter(df, kdims='A', vdims='B').opts(invert_yaxis=True)

# %%
plot_hvplot
# %%
plot_holoviews

Screenshot

image

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:6 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
philippjfrcommented, Nov 16, 2021

This was indeed fixed in Panel a while ago.

0reactions
hali-geovizcommented, Nov 16, 2021

Yes, the specs on versions here are a bit old. Thanks for the update!

Read more comments on GitHub >

github_iconTop Results From Across the Web

Some data points are not plotted when using invert_axes ...
In some instances when I make identical Scatter plots with a categorical axis, when I use invert_axes=True (soon to be called swap_axes=True ) ......
Read more >
Customizing Plots — HoloViews v1.15.3
Axis labels: Setting axis labels using dimensions and options ... HoloViews does not expose every single option a plotting extension like matplotlib or ......
Read more >
Customization — hvPlot 0.8.2 documentation
To look these options up interactively you may either use the tab-completion machinery in IPython or the Jupyter notebook, e.g.: df.hvplot.line(<TAB>.
Read more >
Contours only uses first 7 color_levels intervals, invert axis ...
I am trying to create filled contours plots using Holoviews that have specified color_level intervals, sometimes as much as 20 different ...
Read more >
Pandas API — hvPlot 0.8.2 documentation
Pandas API#. If hvplot and pandas are both installed, then we can use the pandas.options.plotting.backend to control the output of pd.DataFrame.plot and pd....
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