kitizz / nutmeg

A multiplatform, multilingual plotting tool. It's lightweight and asynchronous, and figure layouts are defined declaratively using QML.
GNU General Public License v3.0
21 stars 4 forks source link

Implement Axis Transforms #36

Open kitizz opened 10 years ago

kitizz commented 10 years ago

The QML description of the Figure, an Axis should be able to be provided a transform. This could be done in a number of ways.

A 2D transform:

axisTransform: Transform { Scale {...}, Rotation {...}, ... }

See: http://qt-project.org/doc/qt-5/qml-qtquick-transform.html

Functions:

xTransform: function (X) { return Util.log10(x) }
yTransform: function (Y) { return -Y }
kitizz commented 10 years ago

With the functions, what about going back the other direction?

kitizz commented 10 years ago

For now, stick with affine transformations. QPainter has nice built in support for this: http://qt-project.org/doc/qt-5/QPainter.html#coordinate-transformations