<jupyter_start><jupyter_text>Matplotlib - Gráfico de linha - Parte 3 * Parte 3: Tipo da linha * Importando bibliotecas<jupyter_code>import numpy as np
import matplotlib.pyplot as plt<jupyter_output><empty_output><jupyter_text>* Criando variável X<jupyter_code>X = np.linspace(0,5,11)<jupyter_output><empty_output><jupyter_text>* Criando funções Y(X) e Z(X)<jupyter_code>Y = np.power(X-2,2.0)
Z = np.exp(X/2.0)<jupyter_output><empty_output><jupyter_text>* Gráfico de Y e Z em função de X<jupyter_code>plt.plot(X,Y,label='Y(X)')
plt.plot(X,Z,label='Z(X)')
plt.xlabel('Eixo X')
plt.ylabel('Eixo Y')
plt.show()<jupyter_output><empty_output><jupyter_text>* Alterando linha da função Z(X)<jupyter_code>plt.plot(X,Y,label='Y(X)')
plt.plot(X,Z,label='Z(X)',linestyle='--')
plt.xlabel('Eixo X')
plt.ylabel('Eixo Y')
plt.show()<jupyter_output><empty_output><jupyter_text>* Usando nomes para os tipos de linhas<jupyter_code>plt.plot(X,Y,label='Y(X)', linestyle='dashed')
plt.plot(X,Z,label='Z(X)',linestyle='dashdot')
plt.xlabel('Eixo X')
plt.ylabel('Eixo Y')
plt.show()
plt.plot(X,Y,label='Y(X)', linestyle='solid')
plt.plot(X,Z,label='Z(X)',linestyle='dotted')
plt.xlabel('Eixo X')
plt.ylabel('Eixo Y')
plt.show()<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.19448946515397084, 'fraction_numerical': 0.008914100486223663, 'mean_word_length': 9.378151260504202, 'pattern_counts': {'":': 0, '<': 25, '<?xml version=': 0, '>': 25, 'https://': 0, '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': '6', 'dir': 'jupyter-structured-clean-dedup', 'id': '2986', 'license': 'MIT', 'n_tokens_mistral': 594, 'n_tokens_neox': 568, 'n_words': 80, 'path': 'Data_Science/Matplotlib/2D/2D_Linha_Parte_3.ipynb', 'repo_name': 'maledicente/cursos', 'size': '1234'}