Skip to content

Conversation

@sans-dev
Copy link

@sans-dev sans-dev commented Jan 17, 2024

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:

  1. 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.

  2. 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.

Fixes #694

@varac
Copy link

varac commented Oct 20, 2025

Any chance to get this merged ?

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

SVG images don't have any contour lines

2 participants