Comments (3)
This is definitely something that's on our radar. Currently, the 'iplot_mpl' and 'plot_mpl' both have support for 'updating' with whatever options you want. For instance, this might work for you:
# save the layout you want to use later
import json
my_layout = {'title': 'the title i always use'}
with open('my_layout.json', 'w') as f:
json.dump(my_layout, f)
Now, if you want to use that again...
import matplotlib
import plotly.plotly as py
import json
# make an mpl figure
## do mpl stuff -> get your 'mpl_fig' variable
# load up that layout
with open('my_layout.json') as f:
my_layout = json.load(f)
# use that to update mpl
py.iplot_mpl(mpl_fig, update={'layout':my_layout})
note that the value for the keyword 'update'
must be a valid figure object in plotly
Not saying this is perfect, but I don't think we know what is quite yet. So until then, this is still in discussion mode.
Therefore, I think you already have access to do point (2), but your points (1) and (3) are still up in the air on our end.
This is great feedback, we'll definitely keep this dialogue open as this gets sorted out.
from plotly.py.
great! that addresses (2) perfectly. i must have missed the update option from the users guide.
here is a link to matplotlib style sheets, fyi,
https://github.com/matplotlib/matplotlib/blob/master/doc/users/style_sheets.rst
it would also be cool for plotly to [eventually] provide a set of styles, like ggplot, nyt, printable, journal, etc. i hate seeing time wasted on redundant styling.
by the way, the users guide has helped me enormously. i find the narrative-style docs are much easier to follow than the API-web style. and i love the way plotly is moving. the get_figure() provides a great cross-over workflow.
from plotly.py.
Awesome. This is great to hear! The team, i.e., @etpinard, has been putting a ton of effort into the user guides.
I've checked out the matplotlib styles. Setting defaults and overwriting them is definitely a valid solution to this problem. I think that matplotlib 1.4.x is supposed to push the style features even further.
We're still trying to figure out the best way to do something like get_style(get_figure(""))
so that we see folks grabbing other's styles easily without the original user needing to put in too much effort into making some sort of default style...
I'm going to close this, but reopen it or open a new issue if there's something else to add.
Again, thanks for the feedback!
from plotly.py.
Related Issues (20)
- 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
- Making Radar Charts: make_trace_kwargs uses df.append which has been deprecated in pandas 2.0 HOT 1
- zorder doesn't work on version 5.21.0 HOT 5
- Shared X-axis spike remove tick marks from other subplots in Plotly?
- Update docs for using Jupyter HOT 1
- [Plotly Surface] Weird behavior of hover text for surfacecolor HOT 1
- Adding secondary-y latex legend name shifts x-axis coordinates
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.