Comments (4)
Alright, so, there's no simple way to tell from mpl upon figure opening if the figure is going to need to be bigger. However, the reason you see the long annotation is b.c. you're using mpl in IPython! Try this:
http://nbviewer.ipython.org/gist/theengineear/61fc798db51672299785
You'll note that the GUI that opens clips off the text just like Plotly would, and that's because that's just where the figure ends!
This may not be a real issue. I might suggest we throw a warning when an annotation runs over the edge of a plot in matplotylib.
What do you think?
from plotly.py.
Oh wow! I did not see that coming!
Randal's figure rendered with .show()
yields:
But, with plt.savefig()
and within the notebook, the figure's margins are adjusted.
I suspect that plt.savefig()
has no affect on the mpl object.
from plotly.py.
I think issuing a warning is the right call.
The warning should make a reference to the Margin object and the Annotation object(s) that caused the issue.
Moreover, maybe we include a few words about how plt.savefig()
and IPython NBs adjust the margins so that matplotlylib user can correct their mpl code accordingly.
from plotly.py.
I don't know if the NB actually adjusts anything, the margins are still the same, it's just that the background of the notebook is white, so there's extra canvas to draw on perhaps? i'm not sure how mpl draws in a NB. Nevermind, yeah IPython definitely adjust accordingly.
Yeah, i'll just work on a warning.
from plotly.py.
Related Issues (20)
- [Feature Request] `plotly.offline.plot` adding `iframe` to `output_type` to render an isolated version of outputs inside iframe
- Inconsistent row and col parameters used to add vline to faceted subplots HOT 1
- `fillgradient` doesn't work when `renderer=vscode` is used on notebook HOT 1
- Sort feature for icicle chart
- Scattergl points disappear when reaching a certain threshold in size difference HOT 5
- Parallel coordinates mixed categrical and numerical values HOT 1
- Docs: "Download as HTML" recommends using a `data:` URL, which is restricted in Dash>=2.15.0 HOT 1
- multiple Legends not working in VS code HOT 2
- px.strip jitter doesn't work as expected due to underlying go.Box config HOT 1
- The color of Scattergl points are missing when using animation HOT 1
- tickmode='sync' option is not working as intended
- Cannot provide custom HTTP headers (e.g. bearer token) to Mapbox layer source HOT 2
- `Legendrank` does not work in plotly (pyscript) when `fill` argument is used HOT 2
- Test dependency versions are out of date
- why isn't fig.update_zaxes implimented
- Hover data not displaying on plotly map HOT 1
- plotly.express.scatter_geo() function cannot generate world map HOT 1
- Plotly legends cutoff in Quarto Dashboards
- Opacity and color not working together in px.scatter HOT 1
- Clarify installation of jupyterlab-plotly extension in documentation for JupyterLab 3.x 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 plotly.py.