On Sun, Mar 25, 2012 at 9:54 AM, Bharath M R <catchmrbhar...@gmail.com> wrote: > > > On Sunday, March 25, 2012 5:36:38 PM UTC+5:30, Stefan Krastanov wrote: >> >> > I will be using experimental lambdify for writing the backend for >> > extending matplotlib backend and implementing svgfig backend. >> > Will it be a problem? Because I think experimental_lambdify might change >> > a >> > lot. >> If you use https://github.com/sympy/sympy/pull/673 for your work, you >> >> will not have a choice as the code there depends on >> experimental_lambdify. Using simply lambdify will not permit you to >> plot a substantial part of the possible expressions as lambdify does >> not support them. Anyway, experimental_lambdify is not public and the >> docstring clearly explains that it is not ready for use outside the >> plotting module. >> >> Moreover, I doubt that you will have to use it. The backends do not >> use it directly - the matplotlib backend is mostly done and the svgfig >> backend can just mimic it and nowhere in that part of the code one >> uses experimental_lambdify directly. Of course there are many >> potential bugs to be fixed there, but this is another problem. >> >> It would be more interesting to add another types of plots as >> mentioned on the ideas page. This is the only reason you would have to >> work on the matplotlib backend (besides bug fixes (the module is not >> well tested so you will have many such fixes to do)). > > I was thinking of adding implicit plots, surface/ contour plots, vector > field > plots etc. That would require me to use numpy for getting the points and > I think I will have to use the experimental_lambdify.
You should also thinking about changing the interface as presently given in that pull request. I'm not a fan of trying to squash all possible plot types into a single interface. Sure, plot() can try to guess what is meant by the user, but I think the main interface should be either several functions, or else keyword arguments to plot(), to specify exactly what kind of plot you want. And even as it is now, I'm not a fan of the confusing way you have to do things to plot multiple equations at once. > >> >> Finally, I am not a professional programmer and it may turn out that >> the code I have written is an unsustainable mess :) (hopefully it is >> not). Before starting work on it, you should really review it and >> criticize strongly any drawbacks that you see, even if they are in the >> basic architecture of the module. > > Even I am not a professional programmer. I learnt programming mostly > to solve algorithmic problems and implement most of the things I need > in Electrical Engineering. I have gone through most of your code and it > looks fine to me, though experimental_lambdify looks a more like > a hack at certain places which you have acknowledged in the QnA and the > comments.. Don't worry, very few of us are professional programmers :) This is why we have code review, so that even if you end up doing it wrong, maybe someone else will notice it and point you in the right direction. IMHO, you end up with much better code with non-professional programmers and a review process than with professional programmers with no review process. Aaron Meurer > I am in favor of using experimental_lambdify explicitly for plotting and > nothing else. I think this will allow us to separate the plotting module > from the main codebase. This I think will allow us to add more features > to the plotting backend without having to worry about breaking the > features of sympy. Though this will have lots of code duplication, I think > it is justified by the ease with which we can add/ manipulate evaluation of > series for plotting.This is just my opinion which might not agree with > software programming practices. > Thanks, > Bharath M R > > -- > You received this message because you are subscribed to the Google Groups > "sympy" group. > To view this discussion on the web visit > https://groups.google.com/d/msg/sympy/-/5bsHQeNh5L4J. > > To post to this group, send email to sympy@googlegroups.com. > To unsubscribe from this group, send email to > sympy+unsubscr...@googlegroups.com. > For more options, visit this group at > http://groups.google.com/group/sympy?hl=en. -- You received this message because you are subscribed to the Google Groups "sympy" group. To post to this group, send email to sympy@googlegroups.com. To unsubscribe from this group, send email to sympy+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/sympy?hl=en.