<jupyter_start><jupyter_text>Ha több függvényt ábrázolunk akkor automatikusan jelöli őket:<jupyter_code>fig2 = plt.figure(num = 2, figsize=(16/2.54,10/2.54))
ax = fig2.add_subplot(111)
ax.plot(x2,y2)
ax.plot(x2,y3)

plt.xlabel('x')
# felirat
ax.legend((r'$\sqrt{x}$',r'$x^2$'), loc = 1)
ax.grid()

plt.savefig(".\\abra2.pdf", bbox_inches="tight")

plt.show()
fig3 = plt.figure(num = 3, figsize=(16/2.54,10/2.54))
ax = fig3.add_subplot(111)
ax.plot(x1,y1)

plt.xlabel('x')
plt.ylabel('f(x)')
# megjelenítési határ
plt.ylim(bottom = -0.5, top = 0.5)
ax.grid()

plt.show()
x3 = np.arange(1,14+1)
y3 = [np.exp(x)/(1.4e4) for x in x3]
fig4 = plt.figure(num = 4, figsize=(16/2.54,10/2.54) )
ax = fig4.add_subplot(111)
ax.plot(x3, y3, linestyle = '', marker = 'o')
plt.xlabel('szorgalmi hét sorszáma')
plt.ylabel(r'hallgatók terheltsége [%]-ban')
ax.grid()
plt.show()
fig5 = plt.figure(num = 5, figsize=(16/2.54,10/2.54) )
ax = fig5.add_subplot(111)
ax.plot(x3, y3, linestyle = '', marker = 'o')
plt.yscale('log')
plt.xlabel('szorgalmi hét sorszáma')
plt.ylabel(r'hallgatók terheltsége [%]-ban')
ax.grid()
plt.show()
fig6 = plt.figure(num = 6, figsize=(16/2.54,10/2.54) )
ax = fig6.add_subplot(111)
ax.plot(x3, y3, linestyle = '', marker = 'o')
plt.xscale('log')
plt.yscale('log')
plt.xlabel('szorgalmi hét sorszáma')
plt.ylabel(r'hallgatók terheltsége [%]-ban')
ax.grid()
plt.show()<jupyter_output><empty_output><jupyter_text>Parametrikus függvényábrázolás:<jupyter_code>t = np.linspace(0,2*np.pi,100)
x = [np.sin(t) for t in t]
y = [np.cos(t) for t in t]
fig7 = plt.figure(num = 7, figsize=(16/2.54,10/2.54) )
ax = fig7.add_subplot(111)
ax.plot(x, y, linestyle = '--')
ax.grid()
plt.axis('equal')
plt.show()<jupyter_output><empty_output><jupyter_text>3D függvényábrázolás:<jupyter_code>from mpl_toolkits.mplot3d import Axes3D
def f(x, y):
    return np.sin(np.exp( - x ** 2 - y ** 2))

x = np.linspace(-2, 2, 30)
y = np.linspace(-2, 2, 30)

X, Y = np.meshgrid(x, y)
Z = f(X, Y)
fig = plt.figure(figsize=(16/2.54,10/2.54))
ax = fig.add_subplot(111, projection='3d')
ax.plot_surface(X, Y, Z, cmap='viridis')
plt.show()<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.2162540868752919, 'fraction_numerical': 0.0733302195235871, 'mean_word_length': 5.172910662824208, 'pattern_counts': {'":': 0, '<': 13, '<?xml version=': 0, '>': 13, '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': '3', 'dir': 'jupyter-structured-clean-dedup', 'id': '309453', 'license': 'MIT', 'n_tokens_mistral': 1148, 'n_tokens_neox': 1077, 'n_words': 173, 'path': '01/01_06_fuggvenyabrazolas.ipynb', 'repo_name': 'TamasPoloskei/BME-VEMA', 'size': '2141'}