Skip to content
This repository was archived by the owner on Aug 27, 2026. It is now read-only.
This repository was archived by the owner on Aug 27, 2026. It is now read-only.

Writing contour plots to SVG takes 20 odd seconds #231

Description

@akhileshraju

I am trying to use plotly (offline mode) in python along with orca to export contour plots to SVG.
Given below is the function I use to create contour plots and export it to SVG

def plot_contour_filled_to_svg():
            fig = go.Figure(layout=layout)
            fig.add_contour(
                x=x_axis,
                y=y_axis,
                z=scan_data,
                contours=dict(showlines=False),
                colorscale="Jet",
            )
            pio.write_image(
                fig,
                "C:/Users/araju/PycharmProjects/contour_filled.svg",
            )

It takes roughly 20s to create an SVG every single time. Is this expected behavior?

I though maybe file IO part of the write command is causing that delay so instead of the write_image, I used the to_image to get a bytes representation of the same. That didnt help with the runtime either

I ran the orca server manually in debug mode (looked at a few posts in forums) but I dont know how to make sense of it.

image

Can someone help me out?

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions