Sunday 29 March 2015

Monday 23 March 2015

Daunting Task

As of right now:
4 days
9 hours
53 minutes
left for the gsoc proposal, a daunting task indeed.(How did I end up here when I had a early start?)
I have a basic understanding of what needs to be done in the project matplotlib Integration, but I need specifics.
I also need to write the widget that is supposed to do the work of the artist Figure.
Most of my time till now went with familiarizing my self with mpl interface, understanding it, looking at the files backend writers are most concerned with and understanding the kivy drawing api.
All of this stuff needs to be arranged up and put in my research document.



I can write start writing the basic steps for writing a matplotlib backend, that would start with the backend_bases file itself:
Step 1(as given in backend_template):
Copy this to backend_xxx.py and replace all instances of 'template'
with 'xxx'. Then implement the class methods and functions below, and
add 'xxx' to the switchyard in matplotlib/backends/__init__.py and
'xxx' to the backends list in the validate_backend methon in
matplotlib/__init__.py and you're off. You can use your backend with::

import matplotlib
matplotlib.use('xxx')
from pylab import *
plot([1,2,3])
show()

matplotlib also supports external backends, so you can place you can
use any module in your PYTHONPATH with the syntax::
import matplotlib

matplotlib.use('module://my_backend')

where my_backend.py is your module name. This syntax is also
recognized in the rc file and in the -d argument in pylab, e.g.,::
python simple_plot.py -dmodule://my_backend

If your backend implements support for saving figures (i.e. has a print_xyz()
method) you can register it as the default handler for a given file type
from matplotlib.backend_bases import register_backend

register_backend('xyz', 'my_backend', 'XYZ File Format')
...
plt.savefig("figure.xyz")

The files that are most relevant to backend_writers are
matplotlib/backends/backend_your_backend.py
matplotlib/backend_bases.py
matplotlib/backends/__init__.py
matplotlib/__init__.py
matplotlib/_pylab_helpers.py


Important links:

Wednesday 4 March 2015

Proposal Outline

  1. Introduction. Every software project should solve a problem. Before offering the solution (your Google Summer of Code project), you should first define the problem. What’s the current state of things? What’s the issue you wish to solve and why? Then you should conclude with a sentence or two about your solution. This is somewhat like an elevator pitch.                                                                                                                   >>> So will write something later.
  2. Project goals. This section should again be short and to the point, and it might be a good idea to format it like a list. You should propose a clear list of deliverables, explaining exactly what you promise to do and what you do not plan to do. “Future developments” can be mentioned, but your promise for the three months of Google Summer of Code term is what counts.
  3. Implementation. This section can be longer and more detailed. You should describe what you plan to do as a solution for the problem you defined earlier. You don’t need to provide a lot of technical details, but you do need to show that you understand the technology and illustrate key technical elements of your proposed solution in reasonable detail.
  4. Timeline. This section is easily overlooked, yet it’s arguably more important than the previous section. With the timeline you show that you understand the problem, have a solution, and that you have also broken it down into manageable bits and are have an actual plan on how to approach it. With this section you set expectations, so don’t make promises you can’t keep. A modest, realistic and detailed timeline is much better than a timeline that promises to move mountains. Mentors can spot unrealistic timelines.
  5. About me. If you’re done with the other sections this will be a piece of cake. Just put down your contact information and write a few sentences about you and why you think you’re the best for this job. It’s ok to brag a little ;-)

Sunday 1 March 2015

My understanding of Matplotlib Integration

Matplotlib Integration(mpl) - GSoC project

This requires a front-end to use matplotlib functionality and a back-end for its integration.
Front-end - Is a kivy widget that draws graphs using all the  functions provided by matplotlib.
Back-end - will be made using backend_template.py as base provided by mpl.

Important Questions:
What is a switchyard?
How to make a widget?
Adjust non-interactive mode of mpl such that it does not mess up kivy clock?

Stuff to understand:
Widget class working.
backend_template.py
Switchyard