Bug summary
When a stream plot is drawn, curvature to the lines given by using smaller lines. However, these lines are never connected to each other. When the curvature is high the non-connection becomes visible if user saves the figure for later usage.
The visibility problem does not seem to be existent using show function. I have tested the pdf, svg, eps, png file types and all have the same issue.
Earlier commit, #25112, fixed the problem when the lines have same color and linewidth. However, when colors or linewidth vary, lines appear disconnected.
Code for reproduction
Example with color and linewidth:
#!/usr/bin/py
import numpy as np
import matplotlib.pyplot as plt
w = 3
Y, X = np.mgrid[-w:w:100j, -w:w:100j]
U = -1 - X**2 + Y
V = 1 + X - Y**2
speed = np.sqrt(U**2 + V**2)
linewidth = 1 + 5*(speed-speed.min())/np.ptp(speed)
fig = plt.figure(1)
plt.streamplot(X, Y, U, V, color=speed, linewidth=linewidth)
plt.show()
fig.savefig("streamline.pdf")
Actual outcome
Below is a screenshot of the problem. The line segments appear disconnected from each other when investigated with vector image editor such as Inkscape.

Expected outcome
A random plot produced with matplotlib. In this picture, Inkscape shows the line is connected through its nodes.

Operating system
Artix
Matplotlib Version
3.11.1
Matplotlib Backend
QtAgg
Python version
3.14.7
Bug summary
When a stream plot is drawn, curvature to the lines given by using smaller lines. However, these lines are never connected to each other. When the curvature is high the non-connection becomes visible if user saves the figure for later usage.
The visibility problem does not seem to be existent using show function. I have tested the pdf, svg, eps, png file types and all have the same issue.
Earlier commit, #25112, fixed the problem when the lines have same color and linewidth. However, when colors or linewidth vary, lines appear disconnected.
Code for reproduction
Example with color and linewidth:
Actual outcome
Below is a screenshot of the problem. The line segments appear disconnected from each other when investigated with vector image editor such as Inkscape.
Expected outcome
A random plot produced with matplotlib. In this picture, Inkscape shows the line is connected through its nodes.
Operating system
Artix
Matplotlib Version
3.11.1
Matplotlib Backend
QtAgg
Python version
3.14.7