Comments (8)
There is a scale
parameter in Plotly.toImage
in the PuppeteerSharpRenderer here.
It's just that we don't allow it to surface in the API, but I don't see what would prevent us from doing that...
from plotly.net.
Hmm weird, that parameter is not documented on the plotly.js function reference. Anyways, i'll try it and check whether it has the expected results.
This had an effect back when I first contributed to Plotly.NET :) #179
from plotly.net.
I have done some digging in the docs of the function that is used in the browser to generate these images, and it sadly seems like there is no direct option for this. Other rendering engines for plotly.py support a scale
parameter, but that does not seem to be an option for plotly.toImage
, which is used in the PuppeteerSharpRenderer.
This thread goes a bit into details on a workaround: plotly/dash-core-components#403 (comment) . It involves using the ToImageButtons
, which can be used on a plot displayed in the browser to offer a button to download a plot as image. On that button, you can set the scale (see here).
However, this is a manual process and therefore no real solution for static image export. I'd suggest going the route of the issue i mentioned - exporting to svg and using another program to export the svg to a correctly scaled image format (this is also how i usually make figures publication-ready).
from plotly.net.
I see, thank you for the svg tip @kMutagene, I understand now why your publication example charts use svg. Time to learn inkscape...
from plotly.net.
There is a scale parameter in Plotly.toImage in the PuppeteerSharpRenderer here
Hmm weird, that parameter is not documented on the plotly.js function reference. Anyways, i'll try it and check whether it has the expected results.
from plotly.net.
Just played around and can confirm that scale works (kinda). The image has a larger size with the same DPI (instead of increasing the dpi on the same size), so i guess increasing the scale and then downsizing the image should have the intended effect right?
Still, very weird to not document this at the js docs. I'll prepare an update to the whole render engine thing soon.
from plotly.net.
would this achieve what you need @nhirschey ?
from plotly.net.
closing this, it will be available with the next major version release
from plotly.net.
Related Issues (20)
- Generate C# bindings via code generation based on the core F# API
- Chart descriptions do not work if Cytoscape.NET.Interactive is referenced simultaneously HOT 4
- Contours should be accessible for PointDensity charts HOT 1
- How to create polar plots with Csharp HOT 3
- Suggestion: Documentation / Examples / Extensions for working with DataFrame objects HOT 1
- Exception when using .NET Polyglot Notebook due to strong naming HOT 3
- Add `WithTraceStyle` extension member to Plotly.NET.CSharp
- Plotly.Net.ImageExport ToBase64JPGString hangs in Blazor Server Application HOT 4
- load a custom font from file (ttf, woff, ...others) HOT 9
- With lastest plotly.net version (4.2), when plotting a Bubble3D chart ( or Scatter3D), x/y axis cannot be renamed HOT 4
- Unable to change the legend font size when global font size is defined in layout HOT 1
- plotly.js v2.28.0 compatibility needs huge rework of core API HOT 1
- Rework docs to use polyglot notebooks HOT 5
- Pie Chart's background doesnt change HOT 7
- No way to add guidelines (plotly.js has them) HOT 3
- Update documentation to dotnet interactive to 4.2.1 HOT 1
- `StyleParam.HoverInfo` is missing enum bindings
- Charts marked as `Responsive = true` are not responsive HOT 9
- Annotation not showing in C# HOT 2
- LinearAxis CategoryOrder not working as expected HOT 3
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.net.