Coder Social home page Coder Social logo

Comments (13)

larsoner avatar larsoner commented on June 18, 2024 1

That could make sense, and maybe we shouldn't have the pandas-table-CSS at all. But given we've had it for a while (a year at least?) and people are using it, I'm inclined to try to fix it here and maintain it rather than remove it. :(

from sphinx-gallery.

larsoner avatar larsoner commented on June 18, 2024

To me this looks like a CSS problem

from sphinx-gallery.

GaelVaroquaux avatar GaelVaroquaux commented on June 18, 2024

from sphinx-gallery.

lucyleeow avatar lucyleeow commented on June 18, 2024

Current dataframe css was added in #590. I copied the CSS from nbsphinx (https://github.com/spatialaudio/nbsphinx/blob/fb3ba670fc1ba5f54d4c487573dbc1b4ecf7e9ff/src/nbsphinx.py) who got it from jupyter. I think wide dataframes in jupyter notebooks have horizontal scroll. Maybe we could take a look at jupyter css and update ours?

from sphinx-gallery.

GaelVaroquaux avatar GaelVaroquaux commented on June 18, 2024

First: I find it useful to have a webpage to reproduce the problem, beyond a screenshot. Here is one: https://dirty-cat.github.io/stable/auto_examples/01_dirty_categories.html#sphx-glr-auto-examples-01-dirty-categories-py

Second, in terms of CSS, I played quickly on the above webpage and one solution is to add the following rule:

div.output_subarea {
     overflow-x: auto;
}

I'm not fully happy with the solution, because it means that the overflow is not very visible. I would have liked a hint that there is more information and horizontal scrolling is needed. I didn't find a quick way of doing it.

from sphinx-gallery.

drammock avatar drammock commented on June 18, 2024

IMO this is something that the Sphinx theme should handle rather than SG.

from sphinx-gallery.

photoniker avatar photoniker commented on June 18, 2024

Hey together, I still have some bugy dataframe output.

image

Any idea what settings must be changed?

from sphinx-gallery.

larsoner avatar larsoner commented on June 18, 2024

Have you tried live inspecting and messing with CSS properties (e.g., in Chrome with F12) to see if there is a problematic setting, or if some new CSS would fix it?

from sphinx-gallery.

photoniker avatar photoniker commented on June 18, 2024

In the css file I changed only some colors.

I tried to add my example into the sphiny_gallery examples folder so that it is build and added to that docu.
It seems to me that it is releated to the float values?
image

from sphinx-gallery.

larsoner avatar larsoner commented on June 18, 2024

I don't think you quite followed my suggestion. I am not saying to look at your .css file, I'm saying you should inspect the webpage itself using your browser, e.g.:

Screenshot from 2023-05-12 09-32-05

From there you can directly interact with the CSS in realtime to see if there are CSS settings you can add or remove to fix the problem

from sphinx-gallery.

photoniker avatar photoniker commented on June 18, 2024

You mean Like this? Is it related to the float values?

Screenshot_2023-05-12-15-38-07-789_com.github.android-edit.jpg

from sphinx-gallery.

larsoner avatar larsoner commented on June 18, 2024

No I mean like this -- notice I'm in a browser modifying settings on the fly and see it reflected here in the table width for example:

Screenshot from 2023-05-12 09-42-19

from sphinx-gallery.

photoniker avatar photoniker commented on June 18, 2024

See here in this examples when haveing float values in the dataframe.

image

It looks better with width=auto.
image

from sphinx-gallery.

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.