Repository: ManimCommunity/manim

Issue:
Stroke width is ignored for StreamLines when using a single color
## Description of bug / unexpected behavior
The stroke width for StreamLines is ignored if only a single color is used. This is not the case when color schemes are used. 


## Expected behavior
I would expect StreamLines to obey the `stroke_width` parameter, even for the case when a single color is used. 


## How to reproduce the issue
<!-- Provide a piece of code illustrating the undesired behavior. -->

<details><summary>Code for reproducing the problem</summary>

```py
vector_field = StreamLines(
    func,               # It is not important what this function is. 
    x_range=[-1, 1, 0.1],
    y_range=[-1, 1, 0.1],
    padding=0.1,
    stroke_width=1.0,     # Default is 4.0, hence I would expect them thinner.
    color=BLUE_D
)

self.add(vector_field)
vector_field.start_animation()
self.wait(2 * vector_field.virtual_time / vector_field.flow_speed)
vector_field.end_animation()
```

</details>


## Additional media files
<!-- Paste in the files manim produced on rendering the code above. -->

<details><summary>Images/GIFs</summary>

<!-- PASTE MEDIA HERE -->

</details>


## Logs
<details><summary>Terminal output</summary>
<!-- Add "-v DEBUG" when calling manim to generate more detailed logs -->

```
PASTE HERE OR PROVIDE LINK TO https://pastebin.com/ OR SIMILAR
```

<!-- Insert screenshots here (only when absolutely necessary, we prefer copy/pasted output!) -->

</details>


## System specifications

<details><summary>System Details</summary>

- OS (with version, e.g., Windows 10 v2004 or macOS 10.15 (Catalina)):
- RAM:
- Python version (`python/py/python3 --version`):
- Installed modules (provide output from `pip list`):
```
- Linux 5.10.189-1-MANJARO
- 16 GB RAM
- Python 3.11.3

Package                  Version
------------------------ ------------
certifi                  2023.7.22
charset-normalizer       3.2.0
click                    8.1.7
click-default-group      1.2.4
cloup                    0.13.1
cmake                    3.27.4.1
colour                   0.1.5
contourpy                1.1.0
cycler                   0.11.0
decorator                5.1.1
filelock                 3.12.3
fonttools                4.42.1
glcontext                2.4.0
idna                     3.4
isosurfaces              0.1.0
Jinja2                   3.1.2
kiwisolver               1.4.5
lit                      16.0.6
manim                    0.17.3
ManimPango               0.4.3
mapbox-earcut            1.0.1
markdown-it-py           3.0.0
MarkupSafe               2.1.3
matplotlib               3.7.2
mdurl                    0.1.2
moderngl                 5.8.2
moderngl-window          2.4.4
mpmath                   1.3.0
multipledispatch         1.0.0
networkx                 2.8.8
numpy                    1.25.2
nvidia-cublas-cu11       11.10.3.66
nvidia-cuda-cupti-cu11   11.7.101
nvidia-cuda-nvrtc-cu11   11.7.99
nvidia-cuda-runtime-cu11 11.7.99
nvidia-cudnn-cu11        8.5.0.96
nvidia-cufft-cu11        10.9.0.58
nvidia-curand-cu11       10.2.10.91
nvidia-cusolver-cu11     11.4.0.1
nvidia-cusparse-cu11     11.7.4.91
nvidia-nccl-cu11         2.14.3
nvidia-nvtx-cu11         11.7.91
packaging                23.1
pandas                   2.1.0
Pillow                   9.5.0
pip                      22.3.1
pycairo                  1.24.0
pydub                    0.25.1
pyglet                   2.0.9
Pygments                 2.16.1
pyparsing                3.0.9
pyrr                     0.10.3
python-dateutil          2.8.2
pytz                     2023.3.post1
requests                 2.31.0
rich                     13.5.2
scipy                    1.11.2
screeninfo               0.8.1
seaborn                  0.12.2
setuptools               65.5.1
six                      1.16.0
skia-pathops             0.7.4
srt                      3.5.3
svgelements              1.9.6
sympy                    1.12
torch                    2.0.1
tqdm                     4.66.1
triton                   2.0.0
typing_extensions        4.7.1
tzdata                   2023.3
urllib3                  2.0.4
watchdog                 2.3.1
wheel                    0.38.4
```
</details>

<details><summary>LaTeX details</summary>

+ LaTeX distribution (e.g. TeX Live 2020):
+ Installed LaTeX packages:
<!-- output of `tlmgr list --only-installed` for TeX Live or a screenshot of the Packages page for MikTeX -->
</details>

<details><summary>FFMPEG</summary>

Output of `ffmpeg -version`:

```
ffmpeg version n6.0 Copyright (c) 2000-2023 the FFmpeg developers
built with gcc 13.1.1 (GCC) 20230429
configuration: --prefix=/usr --disable-debug --disable-static --disable-stripping --enable-amf --enable-avisynth --enable-cuda-llvm --enable-lto --enable-fontconfig --enable-gmp --enable-gnutls --enable-gpl --enable-ladspa --enable-libaom --enable-libass --enable-libbluray --enable-libbs2b --enable-libdav1d --enable-libdrm --enable-libfreetype --enable-libfribidi --enable-libgsm --enable-libiec61883 --enable-libjack --enable-libjxl --enable-libmfx --enable-libmodplug --enable-libmp3lame --enable-libopencore_amrnb --enable-libopencore_amrwb --enable-libopenjpeg --enable-libopenmpt --enable-libopus --enable-libpulse --enable-librav1e --enable-librsvg --enable-libsoxr --enable-libspeex --enable-libsrt --enable-libssh --enable-libsvtav1 --enable-libtheora --enable-libv4l2 --enable-libvidstab --enable-libvmaf --enable-libvorbis --enable-libvpx --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxcb --enable-libxml2 --enable-libxvid --enable-libzimg --enable-nvdec --enable-nvenc --enable-opencl --enable-opengl --enable-shared --enable-version3 --enable-vulkan
libavutil      58.  2.100 / 58.  2.100
libavcodec     60.  3.100 / 60.  3.100
libavformat    60.  3.100 / 60.  3.100
libavdevice    60.  1.100 / 60.  1.100
libavfilter     9.  3.100 /  9.  3.100
libswscale      7.  1.100 /  7.  1.100
libswresample   4. 10.100 /  4. 10.100
libpostproc    57.  1.100 / 57.  1.100
```
</details>

## Additional comments
I believe [manim/mobject/vector_field.py#L832](https://github.com/ManimCommunity/manim/blob/main/manim/mobject/vector_field.py#L832) ought to be the following to enable `stroke_width` when `self.single_color` is true. 
```
if config["renderer"] == "opengl":
    line.set_stroke(self.color, width=self.stroke_width / 4.0)
else:
    line.set_stroke(self.color, width=self.stroke_width)
````



Discussion:
Hi there, I'd like to attempt to resolve this issue, would you mind assigning it to me please?

Resolving patch:
diff --git a/manim/mobject/vector_field.py b/manim/mobject/vector_field.py
--- a/manim/mobject/vector_field.py
+++ b/manim/mobject/vector_field.py
@@ -829,7 +829,9 @@ def outside_box(p):
             step = max(1, int(len(points) / self.max_anchors_per_line))
             line.set_points_smoothly(points[::step])
             if self.single_color:
-                line.set_stroke(self.color)
+                line.set_stroke(
+                    color=self.color, width=self.stroke_width, opacity=opacity
+                )
             else:
                 if config.renderer == RendererType.OPENGL:
                     # scaled for compatibility with cairo


Test patch:
diff --git a/tests/module/mobject/types/vectorized_mobject/test_stroke.py b/tests/module/mobject/types/vectorized_mobject/test_stroke.py
--- a/tests/module/mobject/types/vectorized_mobject/test_stroke.py
+++ b/tests/module/mobject/types/vectorized_mobject/test_stroke.py
@@ -2,6 +2,7 @@
 
 import manim.utils.color as C
 from manim import VMobject
+from manim.mobject.vector_field import StreamLines
 
 
 def test_stroke_props_in_ctor():
@@ -24,3 +25,17 @@ def test_set_background_stroke():
     assert m.background_stroke_width == 2
     assert m.background_stroke_opacity == 0.8
     assert m.background_stroke_color.to_hex() == C.ORANGE.to_hex()
+
+
+def test_streamline_attributes_for_single_color():
+    vector_field = StreamLines(
+        lambda x: x,  # It is not important what this function is.
+        x_range=[-1, 1, 0.1],
+        y_range=[-1, 1, 0.1],
+        padding=0.1,
+        stroke_width=1.0,
+        opacity=0.2,
+        color=C.BLUE_D,
+    )
+    assert vector_field[0].stroke_width == 1.0
+    assert vector_field[0].stroke_opacity == 0.2