Skip to content

QWT — Qt Plotting Library

QWT (Qt Widgets for Technical Applications) is a 2D/3D plotting library built on Qt, intended for data visualization in scientific computing and engineering.

Qwt in the Qt plotting ecosystem

There are only a handful of plotting libraries in the Qt ecosystem. The mainstream options are QCustomPlot, Qwt, Qt Charts, and KDChart. After Qt 6.8, the former Qt Charts (2D) and Qt DataVisualization (3D) were merged into a unified Qt Graphs module built entirely on Qt Quick Scene Graph + Qt Quick 3D, abandoning the legacy Graphics-View / QPainter pipeline. However, Qt Graphs must be embedded via QQuickWidget or QQuickWindow, requires the QML runtime, has limited C++ support, and drops support for older systems like Windows 7.

Library License Strengths Weaknesses
QCustomPlot GPL Simple API, widely used GPL requires opening the application source
Qwt LGPL Fast rendering, clean architecture Original author stopped maintaining; deployment was difficult
Qt Charts GPL Official Qt module Low rendering performance; GPL
KDChart MIT (3.0+) Commercial-friendly license Limited rendering quality

This project is based on Qwt 6.2.0. It keeps the original architecture and adds CMake support, Qt 6 compatibility, single-file inclusion, 3D plotting, large-data rendering and other fixes.

Qwt 7.0 New Features

  • CMake support: find_package(qwt) in one line
  • Qt 6 support, compatible with Qt 5.12+ and Qt 6.x
  • Single-file inclusion: add QwtPlot.h and QwtPlot.cpp to the project
  • Flat visual style, replacing the legacy embossed look
  • Figure container for matplotlib-style multi-plot layouts
  • Parasite axes, with no fixed limit on the number of axes
  • Mouse drag and wheel zoom on axes
  • Built-in 3D plotting module
  • C++11 throughout: override, nullptr, smart pointers, range-based for loops
  • 4 curve downsampling algorithms plus SIMD acceleration
  • Color cycle that assigns colors to series automatically
  • QwtPlotBoxChart for statistical distributions
  • Flat styling for sliders, knobs, dials and other controls

Quick Integration

With CMake (recommended):

1
2
3
4
find_package(qwt REQUIRED)
target_link_libraries(${PROJECT_NAME} PRIVATE qwt::plot)
# 3D plotting
target_link_libraries(${PROJECT_NAME} PRIVATE qwt::plot3d)

With the single-file amalgamation:

1
2
3
4
5
// Add src-amalgamate/QwtPlot.h and QwtPlot.cpp to your project
#include "QwtPlot.h"

auto* plot = new QwtPlot("My Plot");
auto* curve = new QwtPlotCurve("Data");

Showcase

Basic Charts

  • Figure Widget
    examples/2D/figure

  • Retained Grid
    examples/2D/figureGrid

  • Simple Plot
    examples/2D/simpleplot

  • Bar Chart
    examples/2D/barchart

  • Scatter Plot
    examples/2D/scatterplot

  • Curve Demo
    examples/2D/curvedemo

  • Box Chart
    examples/2D/boxchart

Real-Time Visualization

  • CPU Monitor
    examples/2D/cpuplot

  • Real-Time Plot
    examples/2D/realtime

  • Oscilloscope
    examples/2D/oscilloscope

  • Radio
    examples/2D/radio

  • Sysinfo
    examples/2D/sysinfo

  • Animated
    examples/2D/animation

Advanced Charts

  • Spectrogram
    examples/2D/spectrogram

  • Vector Field
    playground/vectorfield

  • Stock Chart
    examples/2D/stockchart

  • Polar Demo
    examples/2D/polardemo

  • Parasite Plot
    examples/2D/parasitePlot

  • Bode Plot
    examples/2D/bode

  • Shapes
    playground/shapes

  • Scale Engine
    playground/scaleengine

  • PyPlot
    examples/2D/pyplot

More Examples

  • Distrowatch
    examples/2D/distrowatch

  • Friedberg Bar
    examples/2D/friedberg

  • Friedberg Tube
    examples/2D/friedberg

  • Item Editor
    examples/2D/itemeditor

  • Rasterview 1
    examples/2D/rasterview

  • Rasterview 2
    examples/2D/rasterview

  • Refresh Test
    examples/2D/refreshtest

  • Spline Editor
    examples/2D/splineeditor

  • TV Plot
    examples/2D/tvplot

  • Curve Tracker
    playground/curvetracker

  • Graphic Scale
    playground/graphicscale

  • Plot Matrix
    playground/plotmatrix

  • Rescaler
    playground/rescaler

  • SVG Map
    playground/svgmap

  • Time Scale
    playground/timescale

Interactive Demos

  • Axis Pan
    Axis Dragging

  • Axis Zoom
    Axis Zooming

  • Figure Overlay
    Figure Overlay

  • Series Data Picker
    Data Picker

License

Qwt is published under the Qwt License, Version 1.0. The full copyright notice is reproduced below:

1
2
3
4
5
Qwt Widget Library
Copyright (C) 1997   Josef Wilgen
Copyright (C) 2002   Uwe Rathmann

Qwt is published under the Qwt License, Version 1.0.