Skip to content

QWT — Qt Plotting Library

QWT (Qt Widgets for Technical Applications) is a high-performance 2D/3D plotting library based on Qt, designed for data visualization in scientific computing and engineering applications.

Why Choose QWT?

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, easy to use, widely adopted GPL is "viral" — not commercial-friendly
Qwt LGPL High performance, solid architecture Original author stopped maintaining; deployment was difficult
Qt Charts GPL Qt official Poor performance; GPL license
KDChart MIT (3.0+) Commercial-friendly Mediocre rendering quality

This project is based on Qwt 6.2.0, adding modern features and fixes to make it a license-friendly, high-performance, and easy-to-use Qt plotting library.

Qwt 7.0 New Features

  • CMake supportfind_package(qwt) for one-line integration
  • Qt 6 support — compatible with Qt 5.12+ and Qt 6.x
  • Single-file inclusion — just QwtPlot.h + QwtPlot.cpp, like QCustomPlot
  • Modernized visual style — removed legacy embossed look, flat modern UI
  • Figure container — matplotlib-inspired multi-plot layout
  • Multi-axis support — parasite axis architecture, unlimited axes
  • Axis interaction — mouse drag and scroll-wheel zoom on axes
  • Integrated 2D/3D — built-in 3D plotting module
  • C++11 optimization — modern C++ throughout: override, nullptr, smart pointers, range-based for loops
  • Large-scale data rendering optimization — 4 curve downsampling algorithms + SIMD acceleration, smooth rendering of millions of points
  • Color cycle system — customizable color cycle that auto-assigns colors to series data
  • Box chartQwtPlotBoxChart for statistical distribution visualization
  • Flat-style controls — sliders, knobs, dials and other widgets support flat styling

Quick Integration

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)
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/figure

  • 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/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

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.