Giter Site home page Giter Site logo

Comments (8)

etpinard avatar etpinard commented on May 4, 2024

Marked as duplicate of #83

All image formats listed other than png and svg required a convert step outside the js realm. That is, this will never be part of plotly.js.

Luckily, the plotly cloud handle all those image formats for you. For example, in node.js.

from plotly.js.

mdtusz avatar mdtusz commented on May 4, 2024

@spencerlyon2 another option if you would like to handle pdf's in the browser could be jsPDF, although I haven't used it, and it may not play nicely with plotly plots - you would need to convert from canvas -> png -> pdf using jsPDF.

from plotly.js.

sglyon avatar sglyon commented on May 4, 2024

OK no problem, I can handle it outside of the plotly/javascript realm.

Is there as suggested method for causing the download of an SVG?

from plotly.js.

etpinard avatar etpinard commented on May 4, 2024

@spencerlyon2 this is what #83 will attempt to solve.

from plotly.js.

etpinard avatar etpinard commented on May 4, 2024

closed in favout of #83

from plotly.js.

etpinard avatar etpinard commented on May 4, 2024

svg, png, jpg and webp to-image exports are now available natively via Plotly.toImage as of #446.

For vector-quality pdf or eps figures, I would recommend exporting your graph to an svg and using a conversion utility such as imageMagick to convert the svg to a pdf or eps.

from plotly.js.

etpinard avatar etpinard commented on May 4, 2024

@timelyportfolio oops. Fixed above. Thanks!

from plotly.js.

 avatar commented on May 4, 2024

Hi, I have export my image as svg and do convert -density 300 <image>.svg <image>.png, but the quality doesn't seem to improve. What's wrong? Since we can't set dpi in plot.ly (I'm using python), the only way would be scaling width and height and the marker size, which is inconvenient.

from plotly.js.

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.