Comments (13)
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.
To me this looks like a CSS problem
from sphinx-gallery.
from sphinx-gallery.
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.
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.
IMO this is something that the Sphinx theme should handle rather than SG.
from sphinx-gallery.
Hey together, I still have some bugy dataframe output.
Any idea what settings must be changed?
from sphinx-gallery.
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.
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?
from sphinx-gallery.
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.:
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.
You mean Like this? Is it related to the float values?
from sphinx-gallery.
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:
from sphinx-gallery.
See here in this examples when haveing float values in the dataframe.
It looks better with width=auto.
from sphinx-gallery.
Related Issues (20)
- Support more `_repr_*_` HOT 5
- Add Zenodo for version 0.13.0 HOT 1
- Better support for SVGs when building LaTeX HOT 2
- Add option for vertical alignment of gallery captions?
- 你为什么不支持中文检索
- Running example scripts with custom command HOT 2
- Add an "encoding" attribute to _LoggingTee? HOT 6
- Broken page index with custom gallery order HOT 5
- Searching for short module names in backreferences has side effects HOT 4
- MAINT: Use black and pre-commit HOT 2
- MAINT Unpin sphinx to commit once theme incompatability fixed
- How to pass a data path in gallery .py directories that works also for testing HOT 2
- BUG Sphinx `docname` from source-read event is sometimes `None` HOT 3
- Sidebar navigation broken when using v0.11.0 onwards HOT 2
- Most recent version shows table of content HOT 1
- Gallery thumbnails now showing up HOT 2
- Debug Example Gallery Sorting HOT 4
- Sphinx roles and directives not working in generated examples HOT 4
- BUG: API usage fails when plotting disabled HOT 2
- Links in RST epilog show a warning HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from sphinx-gallery.