<jupyter_start><jupyter_text>* Format StringsA format string consists of a part for color, marker and line:```pythonfmt = '[marker][line][color]'```**Markers**|character|	description||--|--||**.**|	point marker||**,**|	pixel marker||**o**|	circle marker||**v**|	triangle_down marker||**^**|	triangle_up marker||**<**|	triangle_left marker||**>**|	triangle_right marker||**1**|	tri_down marker||**2**|	tri_up marker||**3**|	tri_left marker||**4**|	tri_right marker||**s**|	square marker||**p**|	pentagon marker||*****|	star marker||**h**|	hexagon1 marker||**H**|	hexagon2 marker||**+**|	plus marker||**x**|	x marker||**D**|	diamond marker||**d**|	thin_diamond marker||**'**|	vline marker||**_**|	hline marker|**Line Styles**|character|	description||--|--||**-**| solid line style||**--**	|dashed line style|| **-.**|dash-dot line style|| **:**	|dotted line style||Example| format strings:||--|--||**b**|   blue markers with default shape||**or**|   red circles||**-g**|   green solid line||**--**|   dashed line with default color||**^k:**|  black triangle_up markers connected by a dotted line|**Colors**The supported color abbreviations are the single letter codes|character	|color||--|--||**b**|	blue||**g**| green||**r**| red||**c**|	cyan||**m**|	magenta||**y**|	yellow||**k**|	black||**w**|	white|<jupyter_code># change formatting of the plot
# method 1

plt.plot(ages_x, dev_y, 'k--', label='All Devs')
plt.plot(ages_x, py_dev_y, 'b', label='Python')


plt.xlabel("Ages")
plt.ylabel("Median Salary (USD)")
plt.title("Median Salary (USD) by Age")
plt.legend()
# proper method / more desirable

plt.plot(ages_x, dev_y, color='k', linestyle='--', marker='.', label='All Devs')
plt.plot(ages_x, py_dev_y, color='b', marker='o', label='Python')
plt.xlabel("Ages")
plt.ylabel("Median Salary (USD)")
plt.title("Median Salary (USD) by Age")
plt.legend()
# using hexadecimal value for colors and linewidth

plt.plot(ages_x, py_dev_y, linewidth=3, label='Python')

plt.plot(ages_x, js_dev_y, linewidth=3, label='JavaScript')

plt.plot(ages_x, dev_y, color='#444444', linestyle='--', label='All Devs')

plt.xlabel("Ages")
plt.ylabel("Median Salary (USD)")
plt.title("Median Salary (USD) by Age")
plt.legend()

# adding a grid
plt.grid(True)

# Automatically adjust subplot parameters to give specified padding.
plt.tight_layout()
plt.show()
# using xkcd format

plt.xkcd()
plt.plot(ages_x, py_dev_y, linewidth=3, label='Python')
plt.plot(ages_x, js_dev_y, linewidth=3, label='JavaScript')
plt.plot(ages_x, dev_y, color='#444444', linestyle='--', label='All Devs')
plt.xlabel("Ages")
plt.ylabel("Median Salary (USD)")
plt.title("Median Salary (USD) by Age")
plt.legend()
plt.grid(True)
plt.tight_layout()
# saving file
plt.savefig(r'plots/plot1-1.png')
# ages 18-55

# Ages 18 to 55
ages_x = [18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35,
          36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55]

py_dev_y = [20046, 17100, 20000, 24744, 30500, 37732, 41247, 45372, 48876, 53850, 57287, 63016, 65998, 70003, 70000, 71496, 75370, 83640, 84666,
            84392, 78254, 85000, 87038, 91991, 100000, 94796, 97962, 93302, 99240, 102736, 112285, 100771, 104708, 108423, 101407, 112542, 122870, 120000]

js_dev_y = [16446, 16791, 18942, 21780, 25704, 29000, 34372, 37810, 43515, 46823, 49293, 53437, 56373, 62375, 66674, 68745, 68746, 74583, 79000,
            78508, 79996, 80403, 83820, 88833, 91660, 87892, 96243, 90000, 99313, 91660, 102264, 100000, 100000, 91660, 99240, 108000, 105000, 104000]

dev_y = [17784, 16500, 18012, 20628, 25206, 30252, 34368, 38496, 42000, 46752, 49320, 53200, 56000, 62316, 64928, 67317, 68748, 73752, 77232,
         78000, 78508, 79536, 82488, 88935, 90000, 90056, 95000, 90000, 91633, 91660, 98150, 98964, 100000, 98988, 100000, 108923, 105000, 103117]
plt.plot(ages_x, py_dev_y, linewidth=3, label='Python')
plt.plot(ages_x, js_dev_y, linewidth=3, label='JavaScript')
plt.plot(ages_x, dev_y, color='#444444', linestyle='--', label='All Devs')
plt.xlabel("Ages")
plt.ylabel("Median Salary (USD)")
plt.title("Median Salary (USD) by Age")
plt.legend()
plt.grid(True)
plt.tight_layout()
plt.savefig(r'plots/plot1-2.png')<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.20732860520094562, 'fraction_numerical': 0.16784869976359337, 'mean_word_length': 5.970345963756178, 'pattern_counts': {'":': 0, '<': 6, '<?xml version=': 0, '>': 6, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 9, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '1', 'dir': 'jupyter-structured-clean-dedup', 'id': '360719', 'license': 'MIT', 'n_tokens_mistral': 2311, 'n_tokens_neox': 1674, 'n_words': 435, 'path': 'Matplotlib/.ipynb_checkpoints/Introduction and Line Plots-checkpoint.ipynb', 'repo_name': 'World-of-ML-AI/Data-Analysis-Tools', 'size': '4230'}