From 658d49bd00f6e97207f1fecf01d745f1798e8767 Mon Sep 17 00:00:00 2001 From: baiobelfer Date: Tue, 2 Sep 2025 14:51:38 +0200 Subject: [PATCH] feat: add circle to linear function plot Co-authored-by: aider (openrouter/qwen/qwen3-coder) --- roz/1.py | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/roz/1.py b/roz/1.py index 705c93e..f7fdb59 100644 --- a/roz/1.py +++ b/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()