LabPlot+Cantor for GSOC 2014?
Alexander Semke
Alexander.Semke at web.de
Mon Feb 24 07:41:19 UTC 2014
Hi Shubham,
> I am making progress on the task you assigned me that is extracting data
> from a plot. Please suggest from where I could read how to fix or define a
> coordinate system on the exported image.
You need three points for this. Say, the user has an image of a plot with the
axes ranging from 0 to 1. You let the user click on the image and provide the
coordinates for this points. For this example the user would provide you three
points - (0,0), (1,0) and (0,1). Internally, you know which coordinates of
these points on the image you have. Now, you have to map the pixels on the
image to the points in the coordinate system the user has defined in the very
first step.
Here you don't need to reinvent the wheel. We have already everything for
this. In LabPlot we talk about "scene coordinates" and "logical coordinates".
Scene coordinates are the positions on the image in image's own coordinate
system (for the worksheet we have a QGraphicsScene/View). Logical coordinates
are the actual (well, logical) coordinates. In the example above the logical
coordinate system is defined by the points (0,0), (1,0) and (0,1).
Have a look at CartesianPlotPrivate::retransformScales(). Here you see, how a
CartesianCoordinateSystem-object and a Scale-object are initialized. The
constructor of Scale takes two pairs of points - two points in scene and two
points in logical coordinates. You need a scale object in x- and in y-
direction. These Scales you set to CartesianCoordinateSystem which provides
you several mapping functions from scene to logical coordinates systems and
the other way around.
At the beginning you can limit yourself to linear scales only and to plots
without axes breaking.
> Second thing is the problem with labplot crashing is solved?
Yes, this problem is already solved.
> And how to
> make a proposal for GSoC 2014, I wish you will be available for mentoring
> me on the project.
The project proposals are already made. I don't know how the students should
apply for them. I also was already asked by another student who is interested
in working on labplot. At the moment I don't know when the decision will be
made about which projects proposals and students will get Google's support.
Maybe Lydia can say here something.
Regards
Alexander
More information about the kde-edu
mailing list