{
  "cells": [
    {
      "cell_type": "markdown",
      "metadata": {},
      "source": [
        "\n# Single Word\n\nMake a word cloud with a single word that's repeated.\n"
      ]
    },
    {
      "cell_type": "code",
      "execution_count": null,
      "metadata": {
        "collapsed": false
      },
      "outputs": [],
      "source": [
        "import numpy as np\nimport matplotlib.pyplot as plt\nfrom wordcloud import WordCloud\n\ntext = \"square\"\n\nx, y = np.ogrid[:300, :300]\n\nmask = (x - 150) ** 2 + (y - 150) ** 2 > 130 ** 2\nmask = 255 * mask.astype(int)\n\n\nwc = WordCloud(background_color=\"white\", repeat=True, mask=mask)\nwc.generate(text)\n\nplt.axis(\"off\")\nplt.imshow(wc, interpolation=\"bilinear\")\nplt.show()"
      ]
    }
  ],
  "metadata": {
    "kernelspec": {
      "display_name": "Python 3",
      "language": "python",
      "name": "python3"
    },
    "language_info": {
      "codemirror_mode": {
        "name": "ipython",
        "version": 3
      },
      "file_extension": ".py",
      "mimetype": "text/x-python",
      "name": "python",
      "nbconvert_exporter": "python",
      "pygments_lexer": "ipython3",
      "version": "3.13.5"
    }
  },
  "nbformat": 4,
  "nbformat_minor": 0
}