QCustomPlot Discussion and Comments

Advanced interactionsReturn to overview


First of all, I just wanted to say that this project is just great ! I've been looking for a good charting library for Qt for years, and I was thinking of starting my own project because I couldn't find one. Recently I discovered QCustomPlot, which is good-looking, has a very friendly API, and just works !

Now I would like to work on the interactions, to add some and make them more customizable. What is the best way to do it ? Should I create a fork on gitorious ? Does it have to keep retro-compatibily ? Do you have a plan to change the interactions that I could match ?

Thanks, and long live QCustomPlot !

Hi, what kind of interactions are you thinking of adding? I'm also interested in exploring advanced interaction techniques (such as linked brushing - see http://www.infovis-wiki.net/index.php?title=Linking_and_Brushing) on top of QCustomPlot.

Currently, I was just thinking about zooming a zone by drawing a rectangle, and maybe add tooltips on points.
I don't really get the idea of linking and brushing, can you provide a better example ?


me too I'd be interested in a rubberband like zooming interaction (i.e. drag a rectangle to select a range on X axis, Y axis or both).



for "rubberband zooming" you could look at this:
But it's not integrated in QCustomPlot.



I've spent some time on working on the interactions. If you are interested, you can test my work by getting the current gitorious clone :

To activate the rectange zoom interaction, just use the enumeration I added and call the setInteractions method

Please report any bug or feature request !

Hi wawanbreton,

I feel stupid: is there a place where I can find your modified qcustomplot.h/.cpp in your gitorious link above ?

It seems to me I have to run the "amalgamate" stuff, but I'm windows so it would be a bit of a pain ...

If you want, you can contact me via e-mail: max maini at gmail dot com


Hi HornetMaX, I sent you the files by email, tell me in case you don't have them...

Forgot to reply to this one: wawanbreton's code works like a charm !
Very smart integration in QCP.



I wanted to know if wananbreton added interaction are planned to be merge in QCustomPlot ?

I found some implementation and managed to do what I wanted.

So it's quiet easy to add a rect zoomer :

        _p_plot = new QCustomPlot();
        _p_plot->setInteractions(QCP::iRangeDrag | QCP::iRangeZoom | QCP::iSelectPlottables);
        _p_plot->axisRect()->setRangeZoomAxes(_p_plot->xAxis, NULL); //To block y axis zoom NULL axis as horizontal

I'm new to QCustomPlot and for now I can do every thing I want !