Skip to content

Streamline colors not correctly exported with colormap in TikZ #1

@Thomasmcll

Description

@Thomasmcll

Hello,

I'm facing an issue with exporting figures containing streamlines to TikZ using tikzplotlib. The problem arises when streamlines are colored using a matplotlib colormap, but the colors are not correctly applied in the generated .tex file. Specifically, all streamlines are being assigned the same color, despite being colored according to the data.

Here is a brief description of my problem:

  • I create streamlines using matplotlib.pyplot.streamplot with a colormap applied to the streamlines.
  • When exporting the plot to TikZ with tikzplotlib.save(), the colors are not correctly applied to the individual streamlines, and they all appear with the same color in the resulting .tex file.

I believe the issue is related to how the colors are handled during the conversion process, as the streamlines are not being assigned the correct color values based on the colormap.

Expected Behavior:

  • Streamlines should be colored according to the colormap used in matplotlib.
  • Each streamline should have a color corresponding to the data value it represents.

Thank you for your work on tikzplotlib!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions