This pull request introduces the ability to generate SVG contour outlines in the WordCloud library. This feature enhances the visual representation of word clouds by providing an option to include contour outlines around the words.
Changes include:
Modification in wordcloud.py: The to_svg function in wordcloud.py has been updated to include the contour outlines if the contour attribute is set. The contour is converted into an SVG path command and added to the SVG output.
New test function in test_wordcloud.py: A new test function, test_svg_contour, has been added to test_wordcloud.py. This function tests whether the SVG output includes the contour path when the contour attribute is set.
These changes ensure that users can now generate word clouds with contour outlines in SVG format, providing more flexibility in the visual representation of word clouds. The added test ensures that the new feature works as expected.
Please review the changes and let me know if any adjustments are required.
This pull request introduces the ability to generate SVG contour outlines in the WordCloud library. This feature enhances the visual representation of word clouds by providing an option to include contour outlines around the words.
Changes include:
Modification in
wordcloud.py
: Theto_svg
function inwordcloud.py
has been updated to include the contour outlines if thecontour
attribute is set. The contour is converted into an SVG path command and added to the SVG output.New test function in
test_wordcloud.py
: A new test function,test_svg_contour
, has been added totest_wordcloud.py
. This function tests whether the SVG output includes the contour path when thecontour
attribute is set.These changes ensure that users can now generate word clouds with contour outlines in SVG format, providing more flexibility in the visual representation of word clouds. The added test ensures that the new feature works as expected.
Please review the changes and let me know if any adjustments are required.
Fixes #694