Davide-sd / sympy-plot-backends

An improved plotting module for SymPy
BSD 3-Clause "New" or "Revised" License
44 stars 10 forks source link

Document appending of plots #10

Closed James-G-Hill closed 1 year ago

James-G-Hill commented 1 year ago

Hello, I'm not sure if this is a sympy-plot-backends feature, a sympy feature or maybe a matplotlib feature, but there doesn't seem to be anything in the documents showing how charts can be appended to each other in sympy-plot-backends.

I did the following, remembering how I previously used this with the sympy plotting modules:

p1 = plot3d_spherical(1, show=False)
p2 = plot3d_list(([0, 1, 2], [0, 2, 1], [1, 0, 2]), show=False)
p1.append(p2[0])
p1.show()

This showed me a chart combining the two I had created as desired. I could find it at the following link, but not in the documentation for this package: https://docs.sympy.org/latest/modules/plotting.html#sympy.plotting.plot.Plot.append

Maybe it's not appropriate or maybe an oversight? Just thought I'd mention it because it would seem to be useful information to have.

Absolutely love this package by the way!

Davide-sd commented 1 year ago

It is (and was) documented here.

I never really used append or extend as they usually require more typing. That's why I've implemented the addition of plot objects. There are some examples scattered around the documentation of adding two or more plots together.

Anyway, I have created a new tutorial illustratinga couple of ways to combine plots. Hope that helps.

Absolutely love this package by the way!

Thanks for the kind word! :)

James-G-Hill commented 1 year ago

Great, sorry, I missed those pages. I didn't even realise plots could be added together with +; that's awesome; the new tutorial is a great addition.