Code Monkey home page Code Monkey logo

Comments (9)

droumis avatar droumis commented on June 7, 2024 1

Just adding that the spacing issue seems unrelated to the toolbar:

scatter_matrix(df, alpha=0.5, width=600, height=600, xrotation=0).opts(toolbar='above')

image

from hvplot.

jbednar avatar jbednar commented on June 7, 2024

Just adding that the spacing issue seems unrelated to the toolbar:

Yes, I think the spacing issues have been there for some time, while the toolbar issue is relatively recent, but I haven't tried to do a git bisect to pin that down.

from hvplot.

maximlt avatar maximlt commented on June 7, 2024

Quick feedback:

  • Toolbar issue: possibly introduced in holoviz/holoviews#5873
  • Subplots not aligned: happened sometime around the Bokeh 3 transition (not sure it's a Bokeh 3 problem either)

https://holoviews.org/reference/containers/bokeh/GridSpace.html
image

There may be no hvPlot issue at all.

from hvplot.

jbednar avatar jbednar commented on June 7, 2024

Thanks. I've opened holoviz/holoviews#6126 for the toolbar issue, and @mattpap is looking at it from the Bokeh side.

from hvplot.

mattpap avatar mattpap commented on June 7, 2024

Bad plot alignment is caused by fixed frame sizing (Plot.frame_{width,height,align}), which works reliably only for single plots and doesn't work well in all other cases (see e.g. issue bokeh/bokeh#13225). I suppose it's time to implement this properly.

from hvplot.

maximlt avatar maximlt commented on June 7, 2024

From the initial list of issues:

  1. subplots all lined up: Mateusz indicated this is a Bokeh issue
  2. a single Bokeh toolbar for the entire figure: HoloViews issue fixed in holoviz/holoviews#6127
  3. axis labels readable, text not overlapping

That leaves us with 3). The default Bokeh formatter is the BasicTickFormatter:

image image

Comparing that to the default of plotly express:
image

We can get a similar behavior defining a NumericalTickFormatter:
image

However, it also has its limits:
image

Certainly, we could better document xformatter/yformatter. But should we also consider defaulting to a more user-friendly formatter?

from hvplot.

jbednar avatar jbednar commented on June 7, 2024

Defaulting to a more usable formatter sounds like a great idea. @mattpap , any idea why the tick formatter didn't decide to drop the intermediate tick marks? Here I'd be hoping to get one label on the left of the x axis, and one on the right:

image

from hvplot.

mattpap avatar mattpap commented on June 7, 2024

any idea why the tick formatter didn't decide to drop the intermediate tick marks?

This is handled setting Axis.major_label_policy = NoOverlap(). When this was implemented the default (AllLabels) was left for backwards compatibility. Tickers and tick formatters have no access to the screen space, so they can't make any adjustments based on the positioning of labels.

from hvplot.

jbednar avatar jbednar commented on June 7, 2024

Thanks! Ok, @maxime, can you try out the NoOverlap option with NumericalTickFormatter? For hvPlot I strongly favor improving the user experience over preserving previous defaults.

from hvplot.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.