On Fri, Jan 2, 2015 at 9:32 AM, Shivam Vats <[email protected]> wrote:
> Hi
> I'm Shivam Vats, a second year undergraduate Maths and Computing student
> at IIT, Kharagpur, India. I'll be applying for Gsoc
> 2015 with Sympy. I've got a few patches merged and have been exploring
> Sympy for over a few months. Though I've not decided
> on my proposal, recently while looking into the plotting module I realised
> that there is a lot of work to do in it. The rationale for this
> post is to clear my doubts and get everyone's views regarding the issues
> in the plotting module. I'd appreciate any help.
>
> ISSUES/BUGS
>
> 1) Sympy can't interpret the assumptions about the variables in the
> equations. eg:
>
> x = Symbol('x', positive=True)
> plot(x)
>
> It plots on the default [-10,10] interval, where it clearly shouldn't. My PR
> 8701 <https://github.com/sympy/sympy/pull/8701> is a start, but it solves
> the problem only for
> positive and negative variables. However the basic question is whether we
> should check the range given by the user and
> whether we want to have a smarter default range than the present [-10, 10].
>
I think you're confusing the viewing range and the function range. The
viewing range can be anything. If the function has no values for some
points in the viewing range, it should not plot them. So for instance, you
can plot sqrt(x) or log(x) in [-10, 10], and it will simply have no plotted
points in the negative region. We shouldn't disallow showing the negative
axis for them or anything like that.
> In my opinion, a function that finds the domain of the function, taking
> into account the assumptions about the variables in it
> should work.
>
> 2) Currently if the ylim is not specified, plot adjusts the scale to show
> the whole graph. In many cases it may not be desired
> (Try plotting 1/x with default values) Instead of this default behaviour,
> one which limits the ylim to say a factor(just an example)
> of the max(x) should give better results, something like:
>
>
> if parent.ylim:
> self.ax.set_ylim(parent.ylim)
> else:
> starts = [s.start for s in parent.
> _series]
> ends = [s.end for s in parent._series]
> self.ax.set_ylim(10*min(starts), 10*max
> (ends))
>
> TODOs
>
> 1) ContourSeries class in plot.py is currently not used anywhere:- I found
> this piece of code lying unused. Do we want to create a plot_contour
> function on the lines of plot?
> 2) A more general way to calculate aesthetics:- I found this in the code.
> Could someone please elaborate on what features we might want
> to add? Currently it can handle a function.
> 3) Adaptive sampling for 3D plot as Stefan mentions here
> https://groups.google.com/forum/#!topic/sympy/xHnYUtJVnx0
> using triangular meshes: I don't understand the method right now, but
> would be more than happy to work on it if someone could give me
> some pointers on how to start.
>
These all sound like important fixes, though for a GSoC project, you might
want to have something more substantial (of course, small fixes like this
are also great to do during the summer, but typically GSoC projects have
some larger goal). Unless one of these really is more work than I thought
it was, in which case please correct me.
Aaron Meurer
> Cheers!
>
>
>
> --
> 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 [email protected].
> To post to this group, send email to [email protected].
> Visit this group at http://groups.google.com/group/sympy.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/sympy/741c4bfe-769a-4dbc-8c37-f9572f3160af%40googlegroups.com
> <https://groups.google.com/d/msgid/sympy/741c4bfe-769a-4dbc-8c37-f9572f3160af%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
> For more options, visit https://groups.google.com/d/optout.
>
--
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 [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/sympy.
To view this discussion on the web visit
https://groups.google.com/d/msgid/sympy/CAKgW%3D6J-81eJh-Xb4p95nPxGh-3TimHVaTXyaCv9wzxSkuBdUg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.