79806395

Date: 2025-11-01 07:59:32
Score: 0.5
Natty:
Report link

import numpy as np

import matplotlib.pyplot as plt

# Настройка для поддержки кириллицы

plt.rcParams['font.family'] = 'DejaVu Sans'

plt.rcParams['font.size'] = 12

# Создаем данные для графика

x = np.linspace(0.1, 10, 500)

y = np.log(x) / np.log(1/3) # log_{1/3}(x) = ln(x)/ln(1/3)

# Создаем фигуру и оси

plt.figure(figsize=(10, 6))

# Рисуем график

plt.plot(x, y, 'b-', linewidth=2, label=r'$y = \log_{\frac{1}{3}} x$')

# Отмечаем ключевые точки

points = [(1/9, 2), (1/3, 1), (1, 0), (3, -1), (9, -2)]

for px, py in points:

plt.plot(px, py, 'ro', markersize=6)

plt.annotate(f'({px:.2f}, {py})', (px, py), 

            xytext=(5, 5), textcoords='offset points')

# Настраиваем внешний вид

plt.axhline(y=0, color='k', linestyle='-', alpha=0.3)

plt.axvline(x=0, color='k', linestyle='-', alpha=0.3)

plt.grid(True, alpha=0.3)

plt.xlabel('x')

plt.ylabel('y')

plt.title('График функции $y = \log_{\frac{1}{3}} x$')

plt.legend()

# Устанавливаем пределы осей

plt.xlim(0, 10)

plt.ylim(-3, 3)

plt.tight_layout()

plt.show()

Reasons:
  • Long answer (-1):
  • Has code block (-0.5):
  • Unregistered user (0.5):
  • No latin characters (0.5):
  • Low reputation (1):
Posted by: Qewerytion