<jupyter_start><jupyter_text>A bubble plot is very similar to a scatterplot. Using [matplotlib](https://python-graph-gallery.com/matplotlib/) library, a bubble plot can be constructed using the `scatter()` function. In the example, the following parameters are used:* `x` : The data position on the x axis* `y` : The data position on the y axis* `s` : The marker size* `alpha` : Transparancy ratio<jupyter_code># libraries
import matplotlib.pyplot as plt
import numpy as np
 
# create data
x = np.random.rand(40)
y = np.random.rand(40)
z = np.random.rand(40)
 
# use the scatter function
plt.scatter(x, y, s=z*1000, alpha=0.5)

# show the graph
plt.show()<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.11678832116788321, 'fraction_numerical': 0.017518248175182483, 'mean_word_length': 4.913793103448276, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 1, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '1', 'dir': 'jupyter-structured-clean-dedup', 'id': '209538', 'license': '0BSD', 'n_tokens_mistral': 240, 'n_tokens_neox': 228, 'n_words': 82, 'path': 'src/notebooks/270-basic-bubble-plot.ipynb', 'repo_name': 's-lasch/The-Python-Graph-Gallery', 'size': '685'}