Fine tunning of sympy plot

7 views
Skip to first unread message

Anton Makarov

unread,
Nov 24, 2022, 1:43:01 PM11/24/22
to sympy
Hi, i need to perform fine tunning of sympy plot. For instance, i need to make a grid lines,
change position of legend, ect. How can i do this?

Антон Макаров

unread,
Nov 24, 2022, 3:27:14 PM11/24/22
to sympy




Отправлено из мобильной Почты Mail.ru


четверг, 24 ноября 2022 г., 23:25 +0300 от antonv...@gmail.com <antonv...@gmail.com>:
Thank you for answer but I need to create and tune plots programmatically in order to insert them in web page later. As soon as I use sympy to perform some calculations and create plots for them, the sympy plotting module is ideally suited for my tasks, but I need to learn how to perform plots fine tuning. May be someone knows how to extract matplotlib object instance from sympy one?


Отправлено из мобильной Почты Mail.ru


четверг, 24 ноября 2022 г., 22:35 +0300 от abrom...@gmail.com <abrom...@gmail.com>:

Let me proselytize.   If I want really high quality plots I use Asymptote -

https://asymptote.sourceforge.io/

You would have to learn the plotting language but oh what beautiful plots.  Here is my favorite example -

https://asymptote.sourceforge.io/gallery/3Dwebgl/Klein.html

You can zoom and rotate interactively


On 11/24/22 1:43 PM, Anton Makarov wrote:
Hi, i need to perform fine tunning of sympy plot. For instance, i need to make a grid lines,
change position of legend, ect. How can i do this?
--
You received this message because you are subscribed to the Google Groups "sympy" group.
To unsubscribe from this group and stop receiving emails from it, send an email to sympy+un...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/sympy/a9664ed0-30fa-4a31-8798-cbe367d8d830n%40googlegroups.com.

Oscar Gustafsson

unread,
Nov 24, 2022, 4:26:48 PM11/24/22
to sy...@googlegroups.com
I think one way (the one I use) is to use lambdify to get a function that can generate a NumPy output from a NumPy input and then just rely on Matplotlib. The drawback is that you will have to specify the input in some way and that parts of the "clever" sampling that SymPy does (and maybe handle discontinuities if that is done) does not work. But for well known functions this may not be a problem.

BR Oscar

Den tors 24 nov. 2022 kl 19:43 skrev Anton Makarov <antonv...@gmail.com>:
Hi, i need to perform fine tunning of sympy plot. For instance, i need to make a grid lines,
change position of legend, ect. How can i do this?

--
Reply all
Reply to author
Forward
0 new messages