Closed imakn634 closed 1 year ago
Hello @imakn634 ,
Everything you asked is already implemented in Matplotlib, there is no need to re-implement it on this module. In fact, this module is meant to be a starting point for plotting: once your symbolic expressions are plotted, you can extract the figure and axes object and apply all the customization you'd like, something like this:
from sympy import *
from spb import *
import matplotlib.ticker as tck
var("x")
p = plot(cos(x), (x, -0, 2*pi), show=False)
fig, ax = p.fig, p.ax
ax.minorticks_on()
ax.grid(True, which="minor", color="lightgray", ls="--", linewidth=0.25)
ax.axhline(-0.1, color='black', dashes=(5, 5), linewidth=1)
ax.axhline(0.1, color='black', dashes=(5, 5), linewidth=1)
ax.xaxis.set_major_formatter(tck.FormatStrFormatter('%g $\pi$'))
This is very much helpful. Thank you!
"SymPy Plotting Backends"(SPB) is really the great enhancement of the SymPy plot().
It would be nicer if the following matplotlib.pyplot.plot() functions were also available in SPB.