Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Document that background_color may be set to None #774

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 8 additions & 6 deletions wordcloud/wordcloud.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@

import warnings
from random import Random
from typing import Optional
import io
import os
import re
Expand Down Expand Up @@ -207,7 +208,8 @@ class WordCloud(object):
list will be used. Ignored if using generate_from_frequencies.

background_color : color value (default="black")
Background color for the word cloud image.
Background color for the word cloud image. If set to None, then no
background rectangle will be drawn.

max_font_size : int or None (default=None)
Maximum font size for the largest word. If None, height of the image is
Expand Down Expand Up @@ -309,11 +311,11 @@ class WordCloud(object):
def __init__(self, font_path=None, width=400, height=200, margin=2,
ranks_only=None, prefer_horizontal=.9, mask=None, scale=1,
color_func=None, max_words=200, min_font_size=4,
stopwords=None, random_state=None, background_color='black',
max_font_size=None, font_step=1, mode="RGB",
relative_scaling='auto', regexp=None, collocations=True,
colormap=None, normalize_plurals=True, contour_width=0,
contour_color='black', repeat=False,
stopwords=None, random_state=None,
background_color: Optional[str]='black', max_font_size=None,
font_step=1, mode="RGB", relative_scaling='auto', regexp=None,
collocations=True, vcolormap=None, normalize_plurals=True,
contour_width=0, contour_color='black', repeat=False,
include_numbers=False, min_word_length=0, collocation_threshold=30):
if font_path is None:
font_path = FONT_PATH
Expand Down