adopt-plot

Or AdoptPlot

A library for plotting implicit functions using two rendering engines:

Automatic selection: If the equation has domain restrictions (e.g., logarithm or square root), plot_implicit is used. If the function is smooth, the fast contour engine is chosen. Visually, they are indistinguishable, but the best algorithm is selected automatically.


Installation

pip install adopt-plot

Quick Start

Plot a graph in one line:

from adopt_plot import AdoptPlot

# The plot will open immediately
plot = AdoptPlot("y = 2*x + 2")

Or with deferred display (to add custom elements first):

from adopt_plot import AdoptPlot

plot = AdoptPlot("y = sqrt(x)", show=False)
# Add custom elements here:
plot.ax.scatter(2, 2, color='red')
plot.show()
# Show the plot after modifications

All plot elements (axes, fig, plt) are accessible via the plot object and its attributes:

from adopt_plot import AdoptPlot
plot = AdoptPlot("y = 1/x", show=False)
plot.ax.set_xlim(-10, 10)  # Change X-axis limits
plot.save("my_plot.png", dpi=300)# Save to file
my_plot.png
from adopt_plot import AdoptPlot

plot = AdoptPlot("sin(sqrt(x**2 + y**2)) / log(x**2 + y**2 + 1) = 0", show=False)

# Подкручиваем стиль под публикацию
plot.ax.set_title("Implicit function with radial oscillations")
plot.ax.grid(True, linestyle=':', alpha=0.5)

# Сохраняем с высоким DPI
plot.save("publication_ready.png", dpi=300, bbox_inches='tight')
plot.show()
publication_ready.png

Methods

Parameters

When creating an AdoptPlot object, the following parameters are available:

License

Distributed under the BSD 3-Clause license.


Нет доступных версий для скачивания.

Оцените adopt-plot

☆ ☆ ☆ ☆ ☆


Рейтинг: 5.0 / 5

Отзывы пользователей

  1. Пользователь: Python разработчик
    Оценка: 5
    Комментарий: Это шикарно. Быстрый вход, потом лёгкая настройка
    Ответ разработчика: Благодарим вас за оценку. То что вы назвали и есть наши приоритеты