Questions tagged [qcustomplot]
QCustomPlot is a Qt C++ widget for 2D plotting and data visualization, licensed under the GPL.
174
questions
17
votes
4
answers
21k
views
What are the advantages/disadvantages of QCustomPlot, compared to Qwt?
I am using Qwt now for two years. I like its object oriented classes, which makes it very easy to adapt the plots and functionality.
These days QCustomPlot is becoming more and more popular and ...
12
votes
1
answer
2k
views
QCustomPlot - show item on QCPAxisRect below customPlot
In a project resembling the QCustomPlot financial demo I want to draw a QCPItemRect not only into the chart area, but also to the area below the chart.
Having
QCPAxisRect * xRect = new ...
10
votes
3
answers
15k
views
Display the plot values on mouse over. - Detect Scatter points
I am attempting to display the plot values of different points on my QCustomPlot in which I have a Line style of lsLine. I know i could set a mouse over signal on the QCustomPlot but that wont really ...
7
votes
2
answers
3k
views
How to show math symbols like theta
I'm trying to find a way to show math symbols such as \theta, \phi, \dot{\theta}, ..., etc. I couldn't find a way to show these letters in my plot. Does qcustomplot support math symbols? I've tried ...
6
votes
1
answer
3k
views
Library requires QApplication. How to use QApplication in Qt Quick project?
I have a Qt Quick project and I just added some source files. When trying to build I get the error message:
QWidget: Cannot create a QWidget without QApplication
Since I have a Qt Quick project I ...
5
votes
3
answers
3k
views
How to hide grid and show only zeroline in QCustomPlot?
Is there any way of showing zeroline in QCustomPlot while hiding grid? I have tried hiding grid with following line:
ui->customPlot->xAxis->grid()->setVisible(false);
ui->customPlot-&...
5
votes
1
answer
1k
views
How to implement a custom allocator to be used with std::map?
I'm looking for some pointers on how to implement a custom allocator to be used with a std::map. I'm interested on populating a map with millions of entries without having an allocation for each ...
4
votes
2
answers
9k
views
QCustomPlot Interact with a single point on a graph
I am using QCustomPlot and have a multiple graphs plotted on the screen, i want to be able to click and point and then be able to get the data or coordinates etc of the point that I clicked on, I know ...
4
votes
1
answer
699
views
How can I display a key/value pair on a ToolTip across two graphs?
I am using QCustomPlot to display to graphs, each with a different Key/Value Pairs. On the mouse hover, I am expecting to see the key/value pairs per graph, but instead, I am seeing the first graph on ...
4
votes
1
answer
548
views
How to plot QAbstractItemModel using QCustomPlot
Is there a direct way to pass QAbstractItemModel to QCustomPlot?
Currently I am defining two QVector<double> for Xval and yVal. When I have to plot, I update these two vectors from ...
3
votes
1
answer
2k
views
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 ...
3
votes
1
answer
3k
views
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 ...
3
votes
1
answer
693
views
Why QCustomPlot is too slow in ploting large data?
I want to plotting some large chunk of data (3k) which is coming every 100ms. I tried QCustomPlot and Qwt with exact 3k points and i got really good performances in plotting with Qwt and really bad ...
3
votes
1
answer
3k
views
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 ...
3
votes
4
answers
1k
views
c++/ qt - no such slot - Inheritance
This code:
MyAxis *ax;
ax = static_cast<MyAxis*>(ui->customPlot->axisRect()->addAxis(QCPAxis::atLeft));
connect(ui->customPlot->yAxis, SIGNAL(rangeChanged(QCPRange)),
ax, ...
3
votes
2
answers
2k
views
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:
...
3
votes
1
answer
559
views
qcustomplot: set item by name and find them
I have used the qcustomplot to draw item.
I have two item.
One is item text, another is item rect.
What I want to do is when I select the text, the item rect change the color.
I have used the ...
3
votes
2
answers
5k
views
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 ...
3
votes
2
answers
4k
views
QCustomPlot: How to update data of a graph?
I use QCustomPlot to display histograms of pictures.
The function I use to set the a curve is the following:
void SingleHistogram::setHist(const QVector<double> &x,
...
3
votes
1
answer
3k
views
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 ...
2
votes
3
answers
656
views
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 ...
2
votes
1
answer
2k
views
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 ...
2
votes
1
answer
820
views
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 ...
2
votes
1
answer
2k
views
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 ...
2
votes
1
answer
2k
views
QCustomPlot QCPItemLine
I want to ask a question about qcustomplot. How can i change itemLine position according to Slider? (like x = a)
#include "itemline.h"
#include "ui_itemline.h"
#include "qcustomplot.h"
itemLine::...
2
votes
1
answer
3k
views
QCustomPlot Huge Amount of Data Plotting
I am trying to plot some serial data on my Qt Gui program using qcustomplot class. I had no trouble when I tried to plot low sampling frequency datas like 100 data/second. The graph was really cool ...
2
votes
1
answer
2k
views
QCustomPlot fills in lines that connect
Using the QCustomPlot add on for QT. I am having to plot points which may are not linear so the graph could look something like this
how ever this is the result
but this is what shows up
using ...
2
votes
1
answer
4k
views
Custom tick step on QCustomPlot - QT
Im new in QCustomPlot but I am not able to create custom size of TickStep.
Right now, I have this plot, (time is from 6:00 to 6:00 another day).
And what is my desired X axis label:
I tried to play ...
2
votes
2
answers
171
views
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,
...
2
votes
1
answer
64
views
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 ...
2
votes
1
answer
242
views
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) :...
2
votes
1
answer
353
views
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 ...
2
votes
1
answer
3k
views
QCustomPlot: mouse interaction on secondary axis
I have a QCustomPlot with all the 4 axes enabled and with these interactions activated:
my_w.plot->setInteractions(QCP::iRangeDrag | QCP::iRangeZoom | QCP::iSelectAxes | QCP::iSelectLegend | QCP::...
2
votes
2
answers
2k
views
QCustomPlot display time in HH:MM:SS
I was wondering either it is possible in the QCustomPlot library to change display format of the data on one of the axis. In my application on the X axis I have time in seconds and I would like to ...
2
votes
1
answer
677
views
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 ...
2
votes
0
answers
326
views
Qt Customplot regarding plot varying
I am sending a value to the function plotMainGraph(double serData), so it plots the value I send each time. As an example, I am just sending value 5 and 25 continuously, but the plot which I get is ...
2
votes
0
answers
297
views
Qt, Error (malloc) when adding mulitple widgets with qcustomplots to window
I am trying to make a Widget that contains multiple widgets with each a QCustomplot and some Plot Data (QLabel and QPushbuttons). This widget is open from a mainwindow with parent=0.
I add the ...
2
votes
2
answers
1k
views
How to plot multiple points using QCustomPlot QT5?
Here are some example points:
(1,1),(2,3),(3,1),(4,2),(1,5),(3,4)
I want to plot these points with a line in turn, I've added them into the vector x and y. Then, setData(x,y) was performed.
However, ...
2
votes
0
answers
1k
views
Using Qt 3D with QCustomPlot
I have an application that requires use of both Qt 3D and the QCustomPlot library. However, when attempting to compile QCustomPlot in a project using "QT += 3dinput" in its .pro file, several errors ...
2
votes
1
answer
467
views
Add a slide in Qt that moves a signal up and down the y axis
I have three real time signals on the same graph, but sometimes they overlap and I need a slide button to move them up and down the y axis to see them better. How can I connect the slide to the graph? ...
2
votes
0
answers
2k
views
QCustomPlot, plotting from dynamic vector
I am plotting some data from txt file. And I am changing it according to horizontal and vertical Sliders. I want to replot upper horizontalSlider and lower verticalSlider region. To do this I am ...
1
vote
4
answers
2k
views
Qt Creator's project messed up
I am trying to add crypto++ library to Qt project in QtCreator IDE. I've made a mistake by adding crypto++ sources to project instead of adding .so library. Thus I've deleted crypto++ directory from ...
1
vote
2
answers
3k
views
QCustomplot - Hide / Show selected graph
I'd like to hide / show a graph by selecting it directly on the plot. What I have in mind is something like this:
myPlot->graph(graphIdx)->setVisible(false);
in which myPlot is a QCustomPlot ...
1
vote
1
answer
3k
views
How to draw several lines of the graph in Qt using QCustomPlot
For example, in Visual Studio there is tChart and its Series property, which is responsible for drawing lines of the graph. Here is an example of this code
for (int j = 1; j < Nt - 1; j++)
{
...
1
vote
1
answer
3k
views
Display x and y coordinates on graph in QCustomplot
I want to display the x and y coordinates on mouse move on the graph.
I calculated the x and y coordinates but not really sure how to display on the graph near to the point (preferably like (x,y) this ...
1
vote
1
answer
2k
views
QCustomPlot: How to set percent on the y-axis? How to change tick label alignment?
I am playing around with the QCustomPlot libary for Qt. I created some plots succesfully. But I got still questions:
1: How can I set my y-axis range from 0% to 100%?
2: My tick labels are centered ...
1
vote
1
answer
3k
views
Plotting graphs in qt and customplot library drawing curves
I have problem with QCustomPlot libarary. I made program where user inputs formula and x values then program calulates y values and displays them in nice table.
After that program uses x values and ...
1
vote
1
answer
2k
views
QCustomPlot linker
I would like to use the features of QCustomPlot to draw some results from my openCV projects.
I didn't find a way to include QCustomPlot to my Microsoft Visual Studio 2010. I have included or course ...
1
vote
1
answer
233
views
How to find point of intersection in qcustomplot?
I have an app based on qt (qcustomplot) that prints two different graphs. They have one point of intersection. How to find x and y coordinates of this point?
1
vote
1
answer
483
views
QCustomPlot include causes strange errors on Linux/Ubuntu
Whenever I just include the file qcustomplot.h a huge load of errors come up.
I can't seem to sort this out, especially since it's working all fine on Windows and Mac. Maybe somebody experienced the ...