Questions tagged [qcustomplot]

QCustomPlot is a Qt C++ widget for 2D plotting and data visualization, licensed under the GPL.

QCustomPlot is a Qt C++ widget for 2D plotting and data visualization, licensed under the GPL. It focuses on making good looking, publication quality 2D plots, graphs and charts and also has high performance for realtime visualization applications.

QCustomPlot can export to various formats such as vectorized PDF files and rasterized images like PNG, JPG and BMP. All outputs look identical and the generated PDF files can be imported and edited by vector editors like Inkscape, without trouble. So QCustomPlot is useful for both displaying of realtime data inside the application as well as producing high quality plots for other media.

Resources:

171 questions
3
votes
1 answer

Show points in QCustomPlot with QCPItemTracer

I am trying for a longer while now to create a mechanism that would create text labels next to my points on a plot with the coordinates. From the documentation, I have read that I need to use QCPItemTracer for that. No matter how i try, I cannot…
Łukasz Przeniosło
  • 2,725
  • 5
  • 38
  • 74
3
votes
1 answer

Tooltip-like squares on a QCustomPlot widget

I am using QCustomPlot in Qt Creator. I haven't specified any tooltips for my widget or anything. When I hold down my cursor on the plot without moving, an empty tooltip-like thing appears. I am wondering how to turn this off. I appreciate any hint…
Łukasz Przeniosło
  • 2,725
  • 5
  • 38
  • 74
3
votes
2 answers

How to use QCustomPlot in plot real time

QCustomPlot has setData function that accepts const variable. Is there a way to QCustomPlot can be use to plot dynamically? QCustomPlot setData function accepts constant vectors, but I have to change the values in this vector dynamically. const…
Schwab
  • 91
  • 1
  • 6
3
votes
1 answer

QCustomPlot/Widget doesn't show graph/update

I am using QSplitter where the right pane is QCustomPlot which shows a graph when I click in the left pane (a tree view). The problem is the graph doesn't show up or updates until I resize the splitter. I am using Qt example code: void…
zar
  • 11,361
  • 14
  • 96
  • 178
3
votes
1 answer

How to plot large time series with QCustomPlot efficiently?

I am currently plotting a digital signal in Qt with QCustomPlot but it seems that when the number of samples is greater than 10000000 the operation becomes very slow. I have a time vector and a data vector and I'm setting the data like…
Darien Pardinas
  • 5,910
  • 1
  • 41
  • 48
3
votes
1 answer

Qt - How to define axis intervals on QCustomPlot?

I'm using QCustomPlot, on Qt, to plot aspects of a video sequence. I would like to define the background of my graph in order to define specific zones along my yAxis. My graph is this: And i would like to define intervals in my yAxis to get…
NelsonR
  • 35
  • 4
3
votes
2 answers

Qt auto generated form provides wrong path to source code files

I have added qcustomplot.h/.c files to my Qt project. They are located in: "QT_PROJECT_DIR/QCustomPlot/". Every time I use the designer in Qt Creator and build I get this error in ui_mainwindow.h: error: ../../qcustomplot.h: No such file or…
uniquenamehere
  • 1,869
  • 3
  • 31
  • 60
2
votes
2 answers

How to toggle a QCustomPlot graph's visibility by clicking on the legend

I have a QCustomPlot with multiple graph items on it. I wish to toggle their visibility by clicking on the relevant item in the legend. QObject::connect( plot, &QCustomPlot::legendClick, …
Nik
  • 2,718
  • 23
  • 34
2
votes
1 answer

Is there a method to either recalculate and equation in terms of a different variable?

I am currently a senior in AP Calculus BC and have taken the challenge of replicating a topic in C++ Qt. This topic covers integrals as area beneath a curve, and rotations of said areas to form a solid model with a definite volume. I have…
Nicholas Johnson
  • 1,012
  • 2
  • 12
  • 35
2
votes
1 answer

Qt5 throws std::bad_alloc

I'm trying to use QCustomPlot in my console application. I started by creating a simple wrapper for it that's suitable for my uses. The wrapper was supposed to However, I get std::bad_alloc errors every time I try to show the window. This is my…
mewais
  • 1,265
  • 3
  • 25
  • 42
2
votes
1 answer

Correct allocation and deallocation of a subclassed QCPGraph

I'm using QCustomPlot and have sub-classed QCPGraph in order to provide a drawable graph. class QCPDrawableGraph : public QCPGraph { Q_OBJECT public: QCPDrawableGraph(QCPAxis* x, QCPAxis* y) : QCPGraph(x,y) { //do stuff } …
LCsa
  • 607
  • 9
  • 30
2
votes
1 answer

QT Can't add new plot (QCustomPlot) by context menu

I'm trying to use context menu to add new sub-axes graph to existing qcustomplot widget. If I call my _addGraph function in class constructor, it works as expected. But if I use it as slot, graph is not added to plot. In debug I see that function…
2
votes
1 answer

QCustomPlot add scatter points on top of existing plot

After creating a plot using qcustomplot, how can I, based on existing X values, retrieve the Y values, and then plot points at these locations? My attempt is below: Create plot: This function creates a plot, adds some data (dates) on the x-axis and…
remi
  • 937
  • 3
  • 18
  • 45
2
votes
1 answer

how to change the intensity of curve colour in Qcustomplot with respect to x-axis?

I have a problem where I have to plot a ray from some source.At source the intensity should be strongest and should decrease with distance which is my xaxis.If I am using blue colour to plot my ray than it should be light blue at origin and should…
Aman
  • 23
  • 4
2
votes
3 answers

Display 12digit double or int as full instead of 3.23223e+9 on QLabel

C++ is displaying a number 3232235975 on QLabel as 3.23223e+9, while on QCustomPlot axis as 3.23223*10^9. I am not involving stream such as std::cout, that is why std::setprecision doesn't work for my case. Am actually working with QCustomPlot to…
Wei
  • 78
  • 1
  • 8
1
2
3
11 12