feat: add circle to linear function plot
Co-authored-by: aider (openrouter/qwen/qwen3-coder) <aider@aider.chat>
This commit is contained in:
parent
6a86badaea
commit
658d49bd00
9
roz/1.py
9
roz/1.py
@ -10,6 +10,13 @@ y = x
|
||||
# Narysuj wykres
|
||||
plt.plot(x, y, label='y = x')
|
||||
|
||||
# Dodaj okrąg
|
||||
theta = np.linspace(0, 2*np.pi, 400)
|
||||
radius = 5
|
||||
x_circle = radius * np.cos(theta)
|
||||
y_circle = radius * np.sin(theta)
|
||||
plt.plot(x_circle, y_circle, label=f'Okrąg o promieniu {radius}')
|
||||
|
||||
# Dodaj siatkę
|
||||
plt.grid(True)
|
||||
|
||||
@ -18,7 +25,7 @@ plt.xlabel('x')
|
||||
plt.ylabel('y')
|
||||
|
||||
# Dodaj tytuł
|
||||
plt.title('Wykres funkcji liniowej y = x')
|
||||
plt.title('Wykres funkcji liniowej y = x z okręgiem')
|
||||
|
||||
# Pokaż legendę
|
||||
plt.legend()
|
||||
|
||||
Loading…
Reference in New Issue
Block a user