Export plot #103
-
Hello, how can i export a plot as a svg ? |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments
-
Hi! You can, for now, download it as 'png'. You can click on 'Download plot as a png' among the little buttons on the top-right of a plot. Taipy is based on top of Plotly for charts, so there might be a way to download it as 'svg' not implemented by default with Taipy. |
Beta Was this translation helpful? Give feedback.
-
Thank you for the answer. https://plotly.com/javascript/static-image-export/ I have one workaround that is using plotly with python and reproduce the chart i am displaying but it is not very efficient. |
Beta Was this translation helpful? Give feedback.
-
@vfreysz You can change the configuration to download an 'svg' like you would using Plotly Javascript. Taipy provides the API called plot_config to change the Plotly configuration. Other parameters can also be changed that are described in the Plotly configuration page. from taipy import Gui
x = [1, 2, 3, 4, 5]
y = [2, 4, 1, 6, 3]
data = {'x': x, 'y': y}
# the format can be png, svg, jpeg, webp
config = {
"toImageButtonOptions": {"format": 'svg'},
}
Gui("<|{data}|chart|plot_config={config}|>").run() |
Beta Was this translation helpful? Give feedback.
@vfreysz You can change the configuration to download an 'svg' like you would using Plotly Javascript. Taipy provides the API called plot_config to change the Plotly configuration. Other parameters can also be changed that are described in the Plotly configuration page.