New website!

Seeing what QCustomPlot has become, it’s about time.

opens its gates! The website was completely built from scratch(*). In fact, a custom content management system is working in the background. This will allow quick and easy updates of the website, while giving much more performance and flexibility than the WordPress CMS used for the old one. The old website will stay online for the other small components, that don’t reach the scale of QCustomPlot.

Since the comment section got quite crowded from time to time, I’ve also created a forum. It allows threaded discussions and a better overview of what’s hot. In the next days and weeks, I’ll be migrating the recent relevant comments from the old website to the forum.

(*) The first news post of the old website once promised I’d never build a website from scratch anymore, given what’s possible with WordPress. Well, unfortunately I’ve reached its limits as quickly as it was set up…

QCustomPlot 1.0.0-beta is here!

QCustomPlot 1.0.0-beta is ready for public testing!

These are the links for the packages:
QCustomPlot.tar.gz (Contains source, examples and documentation)
QCustomPlot-sharedlib.tar.gz (Contains shared library compilation/usage .pro files)
QCustomPlot-source.tar.gz (Contains source only)

In the beta phase, the public interface is not frozen, so suggestions for interface improvement are still very welcome for 1.0.0. After the beta phase, public interface changes that are backward-incompatible will only be introduced in the next major version (2.0.0)

I am especially interested in people using Qt 5.0.2 with MSVC, as I don’t have this combination available for testing at the moment.

For people who plan switching to QCustomPlot 1.0.0 once it’s final and have applications built on previous QCustomPlot versions, be aware that there are some source backward-incompatibilities. This was necessary because starting with the new versioning scheme, I wanted to get as many interface fixes/changes done before releasing 1.0.0. I have compiled a FAQ-Like list with questions that I believe might come up when porting from an old QCustomPlot version:

setPlotTitle is gone, how do I set a plot title now?
A plot title now is a layout element. You can add a title like this:
customPlot->plotLayout()->insertRow(0); // inserts an empty row above the default axis rect
customPlot->plotLayout()->addElement(0, 0, new QCPPlotTitle(customPlot, "Your Plot Title"));

where did setupFullAxesBox, setRangeDrag, setMargin etc. go?
Many functions related to the axis rect moved to the QCPAxisRect class. You can reach the default axis rect via customPlot->axisRect(). From there, you can use the functions like you used to.

enable/disable range zoom and drag?
By default, the QCPAxisRect::setRangeZoom/Drag are now set to Qt::Horizontal|Qt::Vertical. To enable range zooming/dragging, all you need to do now is set the corresponding interaction flag: customPlot->setInteractions(QCP::iRangeZoom | QCP::iRangeDrag);

where did setSelected/setSelectable on QCPAxis and QCPLegend go?
they’re now called setSelectedParts/setSelectableParts reflecting the fact, that they don’t handle a bool but an enum with multiple possible parts.

What happened to scatter styles and colors, for example on QCPGraph and QCPCurve?
They’re now handled by QCPScatterStyle. When old code said setScatterStyle(QCP::ssCircle), you now write setScatterStyle(QCPScatterStyle::ssCircle). For more details what’s behind that and the new possibilities, see the documentation of QCPScatterStyle.

For detailed changes, have a look at the changenotes.txt. And of course, the documentation — which is in the first download package — is also up-to-date and thus can help you work with new and changed functionality.

If you have questions not adressed in the list, or feel that the list doesn’t explain an issue in enough detail, please contact me via E-Mail or post a comment.

A little preview of 1.0.0…

Here’s a little sneak preview of the central thing the next release brings:

A major refactoring of the axis rect sytem now allows for much more flexible plots, with basically all the layout possibilities you already know from QWidgets and QLayout. All inside one QCustomPlot instance. You can also have multiple axes per side in one axis rect, when you really need to fit all the data you’ve got into one plot.

Can’t say when the release is going to be finished yet, there still is lots of work to do. After all, it’s going to be 1.0.0, so I’d better be careful ;) . In case you’re wondering, I will use the semantic versioning scheme. That means major versions change the public interface in a backward-incompatible manner, minor versions change the library without breaking backward compatibility and the rightmost number is for patch releases.

Sleep tight!

Big QCP release brings items and more

Yesterday night I finally finished the new QCustomPlot release which introduces, as promised, items!

You know, items, like arrows, text labels, rectangles, straight lines etc. to decorate the plot and emphasize or explain data. To introduce them, a short section was added to the online wlcw tutorial. As always, you’ll get the most useful information from the documentation and the example codes. The base class QCPAbstractItem is a good starting point.

Although Items are the big addition in this release, there are plenty of other new things worth mentioning:

  • Pretty much all visible objects on the plot are now “Layerables” and can be placed on layers (see QCPLayer docs). This gives you a very convenient way to control the rendering order in the plot and organize your objects.
  • The antialiasing is not controlled centralized for all objects of a category anymore, but each object has its own setAntialiased function. The old function setAntialiasedElements can now be used to override the individual settings.
  • In Qt 4.7 the drawing is now absolutely pixel precise due to a smart QPainter subclass that works around some Qt bugs. Of course this is most noticeable when having antialiased and non-antialiased objects side by side that need to line up (like error bars and scatter points). Unfortunately Qt 4.8 is very broken in this respect, so much that a workaround isn’t possible.
  • Added more possibilities to improve performance. You may now specify that antialiasing is disabled while dragging axis ranges to improve responsiveness. Further the plotting hint phFastPolylines allows increasing the performance of graphs when they use solid lines and plot performance is more important than line-joint quality.
  • Shared library compilation and usage is now possible without additional work necessary. See the sharedlib package in the download section which demonstrates this, and the setup section in the online wlcw tutorial.

For a detailed listing of what has changed, what bugs were fixed and what code-compatibility issues may arise, see the changenotes.


The Qt plotting widget QCustomPlot now offers user interactions that go beyond range dragging: object selection and specific click signal emission for graphs, axes, legend, etc.! Additionally to the documentation (and the “user interactions” section of the website-tutorial), the new interactions-example in the QCustomPlot package explains this new feature.

Of course, a few minor changes here and there and a few bugfixes have made it into the release, too, see the changenotes for details.

The next release will probably finally include anchorable objects such as text/images/shapes/arrows. Exciting.

Need…sleep… ;)

New QCustomPlot release

Phew, it’s done.

Most significant new features:
Plottable-interface extends graph-interface and allows for future extension. In line with that come three new plot capabilities: Parametric curves, Bars and Statistical Box Plots. See the new section in the tutorial (above download section) and the documentation.
Further, Axes are now reversable (Yay!)

Apart from that, the documentation was extended quite a bit. With the touched up main page, the new class descriptions and of course the member documentation, one should be able to learn using QCustomPlot even without reading the tutorial on

Off to bed :shock: .

Hash functions for Qt

I needed a modern and secure hash, so I went over to NIST and looked, how the competition’s going. And hey, they’re in the final round, so I only had to pick one among five candidates. I chose Grøstl. Not because my infallible cryptography wisdom told me it’s the best one, but because I liked the play on words. (I’m proud I immediately got it.)

That was a few months ago. Now that I have this website, I thought maybe somebody could also use a modern hash function in Qt. But then it’s only that one function which I chose arbitrarily… So I wrote four more wrapper classes for all of them. And here they are.

A very big thanks goes out to Jean-Philippe Aumasson, Luca Henzen, Willi Meier, Raphael C.-W. Phan, Søren Steffen Thomsen, Martin Schläffer, Christian Rechberger, Florian Mendel, Krystian Matusiewicz, Lars R. Knudsen, Praveen Gauravaram, Hongjun Wu, Guido Bertoni, Joan Daemen, Michaël Peeters, Gilles Van Assche, Niels Ferguson, Stefan Lucks, Bruce Schneier, Doug Whiting, Mihir Bellare, Tadayoshi Kohno, Jon Callas and Jesse Walker, in no particular order, for their hard work on the hash algorithms and for choosing minimum personal profit and maximum benefit for the public by putting the code under no proprietary license, but making it public domain. Chapeau!

WorksLikeClockwork is online

I’ve registered the domain yesterday and linked it to my webspace. Since I had a sandbox-WordPress running for about a week while I constructed the theme and learned how to use WordPress, the actual installation and configuration only took two or three hours today, including E-mail setup and database setup. WordPress is some nice piece of software. Hacking its code is really easy and fun.
Never again am I going to write a website from scratch (Manu from the future: Yeah right…).

I’ll be posting all the content I have in the queue and which sparked this website in the next days and weeks.