JKQTPlotter trunk/v5.0.0
an extensive Qt5+Qt6 Plotter framework (including a feature-richt plotter widget, a speed-optimized, but limited variant and a LaTeX equation renderer!), written fully in C/C++ and without external dependencies
Loading...
Searching...
No Matches
jkqtfastplotter.h
1/*
2 Copyright (c) 2008-2024 Jan W. Krieger (<jan@jkrieger.de>)
3
4
5
6 This software is free software: you can redistribute it and/or modify
7 it under the terms of the GNU Lesser General Public License (LGPL) as published by
8 the Free Software Foundation, either version 2.1 of the License, or
9 (at your option) any later version.
10
11 This program is distributed in the hope that it will be useful,
12 but WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 GNU Lesser General Public License (LGPL) for more details.
15
16 You should have received a copy of the GNU Lesser General Public License (LGPL)
17 along with this program. If not, see <http://www.gnu.org/licenses/>.
18*/
19
20
21
22#ifndef JKQTFASTPLOTTER_H
23#define JKQTFASTPLOTTER_H
24
25#include "jkqtfastplotter_imexport.h"
26#include <QWidget>
27#include <QVector>
28#include <QSettings>
29#include <QColor>
30#include <QVector>
31#include <QPair>
32#include <QStringList>
33#include <QIcon>
34#include <cmath>
35#include <iostream>
36#include <QMutex>
37#include <QPen>
38#include <QPainter>
39#include <QBrush>
40#if (QT_VERSION>=QT_VERSION_CHECK(6, 0, 0))
41#include <QtOpenGLWidgets/QOpenGLWidget>
42#define JKQTFASTPLOTTER_BASE QOpenGLWidget
43#else
44#include <QGLWidget>
45#define JKQTFASTPLOTTER_BASE QGLWidget
46#endif
47#include "jkqtcommon/jkqtpmathtools.h"
48#ifdef DEBUG_TIMING
49# include "jkqtcommon/jkqtphighrestimer.h"
50#endif
51
52
53// forward declaration
54class JKQTFPPlot;
55
56
57/*! \brief a speed optimized plotter class
58 \ingroup jkqtfastplotter
59
60 \deprecated The class JKQTFastPlotter and all its support classes are deprecated and will be removed in future versions.
61
62 This plotter class is (in contrast to JKQTPlotter) optimized for speed. It allows to plot function graphs/data in
63 a simple manner. The focus of design was not on a nice output (athough this is not unimportant), but on the speed
64 of the output. So the class may be used to di quick plotting of data, i.e. in fast image sequence applications.
65
66 These measures were taken to increase speed:
67 - The coordinate system is drawn onto an internal image which is only updated, when the size of the widget
68 or a property of the coordinate system changes. When only the data changes, just the data plot has to be
69 updated.
70 - The class uses an internal buffer with the complete image, so a repaint does not always trigger a complete
71 repaint of all elements, but just measns painting the internal image to the screen. This also allows to
72 plot selections ... over the plot, without having to replot the plots.
73 - The definition of the coordinate system as well as the definition the system ticks ... is reduced to the absolute
74 minimum.
75 - The method setPlotUpdateEnabled() allows to prevent replotting of the class contents, e.g. when you want to set
76 a multitude of parameters without triggering a replot every time.
77 .
78
79 The class supports these features:
80 - coordinate axes may be linear or logarithmic.
81 - ticks and tick labels are drawn by a simple algorithm: The user has to supply two values:
82 \c zeroTick is a tick value that exists in any case (i.e. 0) and \c tickDistance which contains the distance
83 between two ticks (only applicable to linear axes). Then the class starts to draw at zeroTick and move on to
84 \c zeroTick+tickDistance and \c zeroTick-tickDistance until \c min / \c max of the axis is reached. For logarithmic axes
85 the class uses \c zeroTick*10 and \c zeroTick/10
86 - plot may contain a grid (x and y grid may be switched on/off separately).
87 - plots are represented by descendents of JKQTFPPlot and the plotting code is completely
88 contained therein (and should be speed optimized).
89 - it is possible to keep a specified aspect ratio
90 - it is possible to couple different plots in a way, that they are plottetd with the same width/height
91 both in pixel and world coordinates by using plotterSizesChanged() and synchronizeX() / synchronizeY().
92 .
93
94 \image html jkqtfastplotter_test.png
95
96 \see An example for the usage of this class can be found here: \ref JKQTFastPlotterTest
97
98
99*/
101 #if (QT_VERSION>=QT_VERSION_CHECK(6, 0, 0))
102 public QOpenGLWidget
103 #else
104 public QGLWidget
105 #endif
106{
107 Q_OBJECT
108 public:
109
110 /*! \brief smallest allowed line width for JKQTFastPlotter
111 */
112 static const double ABS_MIN_LINEWIDTH;
113
114 /*! \brief size of the lookup tables used by JKQTFPimagePlot_array2image()
115 */
116 static const size_t LUTSIZE;
117
118 protected:
119 /** \brief indicates whether to do full repaint (system and data) at the next repaint (any of the repaint meothods) */
121 /** \brief this stores the currently displayed coordinate system */
123 /** \brief this stores the currently displayed plot */
124 QImage image;
125
126 /** \brief this can be used when drawing a zoom rectangle to store an unchanged
127 * copy of the currently displayed image.
128 */
129 QImage oldImage;
130
131 /** \brief if \c false the plotting won't be performed (may be used to set more than one parameter without replot */
133
134 /** \brief list of plots in this graph */
135 QVector<JKQTFPPlot*> plots;
136
137
138
139 /** \brief free space between widget left border and plot left border */
141 /*! \brief default value for property plotBorderLeft.
142 \see plotBorderLeft for more information */
144 /** \brief free space between widget bottom border and plot bottom border */
146 /*! \brief default value for property plotBorderBottom.
147 \see plotBorderBottom for more information */
149 /** \brief free space between widget right border and plot left border */
151 /*! \brief default value for property plotBorderRight.
152 \see plotBorderRight for more information */
154 /** \brief free space between widget top border and plot bottom border */
156 /*! \brief default value for property plotBorderTop.
157 \see plotBorderTop for more information */
159
160 /** \brief internally calculated: free space between widget left border and plot left border
161 *
162 * \note This is the actual border used for plotting, as it may be different from what the user supplied.
163 * Note also that this is at least as huge as the suer supplied border value!
164 */
166 /** \brief internally calculated: free space between widget bottom border and plot bottom border
167 *
168 * \note This is the actual border used for plotting, as it may be different from what the user supplied.
169 * Note also that this is at least as huge as the suer supplied border value!
170 */
172 /** \brief internally calculated: free space between widget right border and plot left border
173 *
174 * \note This is the actual border used for plotting, as it may be different from what the user supplied.
175 * Note also that this is at least as huge as the suer supplied border value!
176 */
178 /** \brief internally calculated: free space between widget top border and plot bottom border
179 *
180 * \note This is the actual border used for plotting, as it may be different from what the user supplied.
181 * Note also that this is at least as huge as the suer supplied border value!
182 */
184
185 /** \brief plot width in pt inside the widget (calculated by calcPlotScaling() from plotBorderLeft, plotBorderRight and widgetWidth) */
187 /** \brief plot height in pt inside the widget (calculated by calcPlotScaling() from plotBorderTop, plotBorderBottom and widgetHeight) */
189
190 /** \brief color of the coordinate system */
191 QColor systemColor;
192 /*! \brief default value for property systemColor.
193 \see systemColor for more information */
195 /** \brief width of the coordinate (in pixel) */
196 double systemWidth;
197 /*! \brief default value for property systemWidth.
198 \see systemWidth for more information */
200 /** \brief color of the background*/
202 /*! \brief default value for property backgroundColor.
203 \see backgroundColor for more information */
205 /** \brief color of the plot's background
206 *
207 * \note the background is not drawn if this color is set to \c QColor(Qt::transparent) !
208 */
210 /*! \brief default value for property plotBackgroundColor.
211 \see plotBackgroundColor for more information */
213 /** \brief indicates whether to draw a system box */
215 /*! \brief default value for property drawSystemBox.
216 \see drawSystemBox for more information */
218 /** \brief indicates whether to draw axes at x=0/y=0 */
220 /*! \brief default value for property drawZeroAxes.
221 \see drawZeroAxes for more information */
223
224 /** \brief indicates whether to draw a grid */
225 bool drawGrid;
226 /*! \brief default value for property drawGrid.
227 \see drawGrid for more information */
229 /** \brief color of the coordinate grid */
230 QColor gridColor;
231 /*! \brief default value for property gridColor.
232 \see gridColor for more information */
234 /** \brief style of the coordinate grid */
235 Qt::PenStyle gridStyle;
236 /*! \brief default value for property gridStyle.
237 \see gridStyle for more information */
238 Qt::PenStyle default_gridStyle;
239 /** \brief width of the coordinate grid (in pixel) */
240 double gridWidth;
241 /*! \brief default value for property gridWidth.
242 \see gridWidth for more information */
244 /** \brief font size (in points) of the axis labels */
246 /*! \brief default value for property labelFontSize.
247 \see labelFontSize for more information */
249 /** \brief font name of the axis labels */
251 /*! \brief default value for property labelFontName.
252 \see labelFontName for more information */
254 /** \brief font size (in points) of the tick labels */
256 /*! \brief default value for property tickFontSize.
257 \see tickFontSize for more information */
259 /** \brief font name of the tick labels */
260 QString tickFontName;
261 /*! \brief default value for property tickFontName.
262 \see tickFontName for more information */
264
265 /** \brief length of an axis tick (pixels) */
266 double tickLength;
267 /*! \brief default value for property tickLength.
268 \see tickLength for more information */
270
271
272 /** \brief minimum value of x axis */
273 double xMin;
274 /** \brief maximum value of x axis */
275 double xMax;
276 /** \brief minimum value of y axis */
277 double yMin;
278 /** \brief maximum value of y axis */
279 double yMax;
280 /** \brief is x axis logarithmic? */
282 /** \brief is x axis logarithmic? */
284
285 /** \brief width of plot on x axis (calculated internally) */
286 double xWidth;
287 /** \brief x axis scaling factor (calculated internally) */
288 double xScale;
289 /** \brief x axis offset (calculated internally) */
290 double xOffset;
291 /** \brief width of plot on y axis (calculated internally) */
292 double yWidth;
293 /** \brief y axis scaling factor (calculated internally) */
294 double yScale;
295 /** \brief y axis offset (calculated internally) */
296 double yOffset;
297 /** \brief a label position from which axis label plotting is started for the x axis */
298 double xZeroTick;
299 /** \brief a label position from which axis label plotting is started for the y axis */
300 double yZeroTick;
301 /** \brief distance between two labels on x axis */
303 /** \brief distance between two labels on y axis */
305 /** \brief label of x axis */
306 QString xAxisLabel;
307 /** \brief label of y axis */
308 QString yAxisLabel;
309
310 /** \brief plot y axis label */
312 /** \brief plot x axis label */
314
315 /** \brief synchronize x-axis settings to this plotter */
317 /** \brief synchronize y-axis settings to this plotter */
319
320 /** \brief aspect ratio of the plot, only used when maintainAspectRation is \c true
321 *
322 * The aspect ratio is defined as \c width/height of the plot in pt.
323 * So if you want to have a plot spanning \c x=0..20 and \c y=0..10 where each 1x1 square should be
324 * as wide as high you will have to set aspectRatio to \c 2 .
325 *
326 * \note Note that aspect ratios only make sense for linear-linear plots. This will be ignored
327 * if any one axis is logarithmic.
328 */
330 /** \brief indicates whether to maintain a specific aspect ratio */
332
336
339
340 QAction* actCopyImage;
341
342 /** \brief this simply paints the stored image to the widget's surface */
343 virtual void paintEvent(QPaintEvent *event) override;
344
345 /** \brief resizes the internal representation (image) of the graphs */
346 virtual void resizeEvent(QResizeEvent *event) override;
347
348
349 /** \brief event handler for a double click */
350 virtual void mouseDoubleClickEvent ( QMouseEvent * event ) override;
351
352 /** \brief event handler for a mouse move */
353 virtual void mouseMoveEvent ( QMouseEvent * event ) override;
354
355 /** \brief event handler for a mouse button press */
356 virtual void mousePressEvent ( QMouseEvent * event ) override;
357
358 /** \brief event handler for a mouse button is released */
359 virtual void mouseReleaseEvent(QMouseEvent* event) override;
360
361 /** \brief paint the coordinate system */
362 void plotSystem(QPainter& painter);
363
364 /** \brief paint the graphs */
365 void plotGraphs(QPainter& painter);
366
367 /** \brief recalculate the scaling of the plot */
369
370 QSize minimumSizeHint() const override;
371
372 /** \brief mutex to lock global widget repaint */
374
375 /** \brief mutex to lock data repaint */
377
378 /** \brief mutex to lock system repaint */
380
381 public:
382 /** \brief class constructor */
383 JKQTFastPlotter(QWidget *parent = nullptr);
384
385 /** \brief set the properties of the x axis */
386 void setXRange(double min, double max, bool logarithmic=false);
387
388 /** \brief set the properties of the y axis */
389 void setYRange(double min, double max, bool logarithmic=false);
390
391 /** \brief set the properties of both axes */
392 void setXYRange(double xmin, double xmax, double ymin, double ymax, bool xlogarithmic=false, bool ylogarithmic=false);
393
394 /** \brief clear all plots in the graph
395 *
396 * \param remove if \c true the object will also be deleted from memory, not just from the list
397 */
398 void clearPlots(bool remove=false);
399 /** \brief add a new graph */
401 /** \brief return the internal number (0..N-1) of the given plot, or -1*/
403 /** \brief remove given graph
404 *
405 * \param id specifies the graph to delete
406 * \param remove if \c true the object will also be deleted from memory, not just from the list
407 */
408 void deletePlot(int id, bool remove=false);
409 /** \brief remove given graph
410 *
411 * \param g specifies the graph to delete
412 * \param remove if \c true the object will also be deleted from memory, not just from the list
413 */
414 void deletePlot(JKQTFPPlot* g, bool remove=false);
415
416
417 /** \brief return x-pixel coordinate from x coordinate */
418 inline double x2p(double x) {
419 if (xAxisLog) {
420 if (x<=0) return xOffset+log(xMin/10.0)/JKQTPSTATISTICS_LN10*xScale;
421 return xOffset+log(x)/JKQTPSTATISTICS_LN10*xScale;
422 } else {
423 return xOffset+x*xScale;
424 }
425 }
426
427 /** \brief return x coordinate from x-pixel */
428 inline double p2x(long x) {
429 if (xAxisLog) {
430 return exp(JKQTPSTATISTICS_LN10*(static_cast<double>(x)-xOffset)/(xScale));
431 } else {
432 return (static_cast<double>(x)-xOffset)/(xScale);
433 }
434 }
435
436 /** \brief return y-pixel coordinate from y coordinate */
437 inline double y2p(double y) {
438 if (yAxisLog) {
439 if (y<=0) return yOffset-log(yMin/10.0)/JKQTPSTATISTICS_LN10*yScale;
440 return yOffset-log(y)/JKQTPSTATISTICS_LN10*yScale;
441 } else {
442 return yOffset-y*yScale;
443 }
444 }
445
446 /** \brief return y coordinate from y-pixel */
447 inline double p2y(long y) {
448 if (yAxisLog) {
449 return exp(JKQTPSTATISTICS_LN10*(static_cast<double>(y)-yOffset)/(-1.0*yScale));
450 } else {
451 return (static_cast<double>(y)-yOffset)/(-1.0*yScale);
452 }
453 }
454
455 /** \copydoc dragShapePen */
456 inline void setDragShapePen(const QPen & __value)
457 {
458 if (this->dragShapePen != __value) {
459 this->dragShapePen = __value;
460 update();
461 }
462 }
463 /** \copydoc dragShapePen */
464 inline QPen getDragShapePen() const
465 {
466 return this->dragShapePen;
467 }
468 /** \copydoc dragLine */
469 inline void setDragLine(bool __value)
470 {
471 if (this->dragLine != __value) {
472 this->dragLine = __value;
473 update();
474 }
475 }
476 /** \copydoc dragLine */
477 inline bool getDragLine() const
478 {
479 return this->dragLine;
480 }
481
482 /** \copydoc plotBorderLeft */
483 inline void setPlotBorderLeft(int __value)
484 {
485 if (this->plotBorderLeft != __value) {
486 this->plotBorderLeft = __value;
487 redrawPlot();
488 }
489 }
490 /** \copydoc plotBorderLeft */
491 inline int getPlotBorderLeft() const
492 {
493 return this->plotBorderLeft;
494 }
495 /** \copydoc plotBorderBottom */
496 inline void setPlotBorderBottom(int __value)
497 {
498 if (this->plotBorderBottom != __value) {
499 this->plotBorderBottom = __value;
500 redrawPlot();
501 }
502 }
503 /** \copydoc plotBorderBottom */
504 inline int getPlotBorderBottom() const
505 {
506 return this->plotBorderBottom;
507 }
508 /** \copydoc plotBorderRight */
509 inline void setPlotBorderRight(int __value)
510 {
511 if (this->plotBorderRight != __value) {
512 this->plotBorderRight = __value;
513 redrawPlot();
514 }
515 }
516 /** \copydoc plotBorderRight */
517 inline int getPlotBorderRight() const
518 {
519 return this->plotBorderRight;
520 }
521 /** \copydoc plotBorderTop */
522 inline void setPlotBorderTop(int __value)
523 {
524 if (this->plotBorderTop != __value) {
525 this->plotBorderTop = __value;
526 redrawPlot();
527 }
528 }
529 /** \copydoc plotBorderTop */
530 inline int getPlotBorderTop() const
531 {
532 return this->plotBorderTop;
533 }
534 /** \copydoc plotWidth */
535 inline int getPlotWidth() const {
536 return this->plotWidth;
537 }
538 /** \copydoc plotHeight */
539 inline int getPlotHeight() const {
540 return this->plotHeight;
541 }
542 /** \copydoc doDrawing */
543 inline void setPlotUpdateEnabled(bool __value)
544 {
545 this->doDrawing = __value;
546 }
547 /** \copydoc doDrawing */
548 inline bool isPlotUpdateEnabled() const
549 {
550 return this->doDrawing;
551 }
552 /** \copydoc internalPlotBorderLeft */
553 inline int getInternalPlotBorderLeft() const {
554 return this->internalPlotBorderLeft;
555 }
556 /** \copydoc internalPlotBorderBottom */
557 inline int getInternalPlotBorderBottom() const {
558 return this->internalPlotBorderBottom;
559 }
560 /** \copydoc internalPlotBorderRight */
561 inline int getInternalPlotBorderRight() const {
562 return this->internalPlotBorderRight;
563 }
564 /** \copydoc internalPlotBorderTop */
565 inline int getInternalPlotBorderTop() const {
566 return this->internalPlotBorderTop;
567 }
568 /** \copydoc xMin */
569 inline double getXMin() const {
570 return this->xMin;
571 }
572 /** \copydoc xMax */
573 inline double getXMax() const {
574 return this->xMax;
575 }
576 /** \copydoc yMin */
577 inline double getYMin() const {
578 return this->yMin;
579 }
580 /** \copydoc yMax */
581 inline double getYMax() const {
582 return this->yMax;
583 }
584 /** \copydoc xAxisLog */
585 inline bool getXAxisLog() const {
586 return this->xAxisLog;
587 }
588 /** \copydoc yAxisLog */
589 inline bool getYAxisLog() const {
590 return this->yAxisLog;
591 }
592
593 /** \copydoc backgroundColor */
594 inline void setBackgroundColor(const QColor & __value)
595 {
596 if (this->backgroundColor != __value) {
597 this->backgroundColor = __value;
598 redrawPlot();
599 }
600 }
601 /** \copydoc backgroundColor */
602 inline QColor getBackgroundColor() const
603 {
604 return this->backgroundColor;
605 }
606 /** \copydoc plotBackgroundColor */
607 inline void setPlotBackgroundColor(const QColor & __value)
608 {
609 if (this->plotBackgroundColor != __value) {
610 this->plotBackgroundColor = __value;
611 redrawPlot();
612 }
613 }
614 /** \copydoc plotBackgroundColor */
615 inline QColor getPlotBackgroundColor() const
616 {
617 return this->plotBackgroundColor;
618 }
619 /** \copydoc drawGrid */
620 inline void setDrawGrid(bool __value)
621 {
622 if (this->drawGrid != __value) {
623 this->drawGrid = __value;
624 redrawPlot();
625 }
626 }
627 /** \copydoc drawGrid */
628 inline bool getDrawGrid() const
629 {
630 return this->drawGrid;
631 }
632 /** \copydoc gridColor */
633 inline void setGridColor(const QColor & __value)
634 {
635 if (this->gridColor != __value) {
636 this->gridColor = __value;
637 redrawPlot();
638 }
639 }
640 /** \copydoc gridColor */
641 inline QColor getGridColor() const
642 {
643 return this->gridColor;
644 }
645 /** \copydoc gridStyle */
646 inline void setGridStyle(Qt::PenStyle __value)
647 {
648 if (this->gridStyle != __value) {
649 this->gridStyle = __value;
650 redrawPlot();
651 }
652 }
653 /** \copydoc gridStyle */
654 inline Qt::PenStyle getGridStyle() const
655 {
656 return this->gridStyle;
657 }
658 /** \copydoc gridWidth */
659 inline void setGridWidth(double __value)
660 {
661 if (this->gridWidth != __value) {
662 this->gridWidth = __value;
663 redrawPlot();
664 }
665 }
666 /** \copydoc gridWidth */
667 inline double getGridWidth() const
668 {
669 return this->gridWidth;
670 }
671 /** \copydoc labelFontSize */
672 inline void setLabelFontSize(double __value)
673 {
674 if (this->labelFontSize != __value) {
675 this->labelFontSize = __value;
676 redrawPlot();
677 }
678 }
679 /** \copydoc labelFontSize */
680 inline double getLabelFontSize() const
681 {
682 return this->labelFontSize;
683 }
684 /** \copydoc labelFontName */
685 inline void setLabelFontName(const QString & __value)
686 {
687 if (this->labelFontName != __value) {
688 this->labelFontName = __value;
689 redrawPlot();
690 }
691 }
692 /** \copydoc labelFontName */
693 inline QString getLabelFontName() const
694 {
695 return this->labelFontName;
696 }
697 /** \copydoc tickFontSize */
698 inline void setTickFontSize(double __value)
699 {
700 if (this->tickFontSize != __value) {
701 this->tickFontSize = __value;
702 redrawPlot();
703 }
704 }
705 /** \copydoc tickFontSize */
706 inline double getTickFontSize() const
707 {
708 return this->tickFontSize;
709 }
710 /** \copydoc tickFontName */
711 inline void setTickFontName(const QString & __value)
712 {
713 if (this->tickFontName != __value) {
714 this->tickFontName = __value;
715 redrawPlot();
716 }
717 }
718 /** \copydoc tickFontName */
719 inline QString getTickFontName() const
720 {
721 return this->tickFontName;
722 }
723 /** \copydoc tickLength */
724 inline void setTickLength(double __value)
725 {
726 if (this->tickLength != __value) {
727 this->tickLength = __value;
728 redrawPlot();
729 }
730 }
731 /** \copydoc tickLength */
732 inline double getTickLength() const
733 {
734 return this->tickLength;
735 }
736 /** \copydoc drawSystemBox */
737 inline void setDrawSystemBox(bool __value)
738 {
739 if (this->drawSystemBox != __value) {
740 this->drawSystemBox = __value;
741 redrawPlot();
742 }
743 }
744 /** \copydoc drawSystemBox */
745 inline bool getDrawSystemBox() const
746 {
747 return this->drawSystemBox;
748 }
749 /** \copydoc drawZeroAxes */
750 inline void setDrawZeroAxes(bool __value)
751 {
752 if (this->drawZeroAxes != __value) {
753 this->drawZeroAxes = __value;
754 redrawPlot();
755 }
756 }
757 /** \copydoc drawZeroAxes */
758 inline bool getDrawZeroAxes() const
759 {
760 return this->drawZeroAxes;
761 }
762 /** \copydoc systemColor */
763 inline void setSystemColor(const QColor & __value)
764 {
765 if (this->systemColor != __value) {
766 this->systemColor = __value;
767 redrawPlot();
768 }
769 }
770 /** \copydoc systemColor */
771 inline QColor getSystemColor() const
772 {
773 return this->systemColor;
774 }
775 /** \copydoc systemWidth */
776 inline void setSystemWidth(double __value)
777 {
778 if (this->systemWidth != __value) {
779 this->systemWidth = __value;
780 redrawPlot();
781 }
782 }
783 /** \copydoc systemWidth */
784 inline double getSystemWidth() const
785 {
786 return this->systemWidth;
787 }
788 /** \copydoc xZeroTick */
789 inline void setXZeroTick(double __value)
790 {
791 if (this->xZeroTick != __value) {
792 this->xZeroTick = __value;
793 redrawPlot();
794 }
795 }
796 /** \copydoc xZeroTick */
797 inline double getXZeroTick() const
798 {
799 return this->xZeroTick;
800 }
801 /** \copydoc yZeroTick */
802 inline void setYZeroTick(double __value)
803 {
804 if (this->yZeroTick != __value) {
805 this->yZeroTick = __value;
806 redrawPlot();
807 }
808 }
809 /** \copydoc yZeroTick */
810 inline double getYZeroTick() const
811 {
812 return this->yZeroTick;
813 }
814 /** \copydoc xTickDistance */
815 inline void setXTickDistance(double __value)
816 {
817 if (this->xTickDistance != __value) {
818 this->xTickDistance = __value;
819 redrawPlot();
820 }
821 }
822 /** \copydoc xTickDistance */
823 inline double getXTickDistance() const
824 {
825 return this->xTickDistance;
826 }
827 /** \copydoc yTickDistance */
828 inline void setYTickDistance(double __value)
829 {
830 if (this->yTickDistance != __value) {
831 this->yTickDistance = __value;
832 redrawPlot();
833 }
834 }
835 /** \copydoc yTickDistance */
836 inline double getYTickDistance() const
837 {
838 return this->yTickDistance;
839 }
840 /** \copydoc xAxisLabel */
841 inline void setXAxisLabel(const QString & __value)
842 {
843 if (this->xAxisLabel != __value) {
844 this->xAxisLabel = __value;
845 redrawPlot();
846 }
847 }
848 /** \copydoc xAxisLabel */
849 inline QString getXAxisLabel() const
850 {
851 return this->xAxisLabel;
852 }
853 /** \copydoc yAxisLabel */
854 inline void setYAxisLabel(const QString & __value)
855 {
856 if (this->yAxisLabel != __value) {
857 this->yAxisLabel = __value;
858 redrawPlot();
859 }
860 }
861 /** \copydoc yAxisLabel */
862 inline QString getYAxisLabel() const
863 {
864 return this->yAxisLabel;
865 }
866 /** \copydoc aspectRatio */
867 inline void setAspectRatio(double __value)
868 {
869 if (this->aspectRatio != __value) {
870 this->aspectRatio = __value;
871 redrawPlot();
872 }
873 }
874 /** \copydoc aspectRatio */
875 inline double getAspectRatio() const
876 {
877 return this->aspectRatio;
878 }
879 /** \copydoc maintainAspectRatio */
880 inline void setMaintainAspectRatio(bool __value)
881 {
882 if (this->maintainAspectRatio != __value) {
883 this->maintainAspectRatio = __value;
884 redrawPlot();
885 }
886 }
887 /** \copydoc maintainAspectRatio */
888 inline bool doesMaintainAspectRatio() const
889 {
890 return this->maintainAspectRatio;
891 }
892 /** \copydoc xAxisLabelVisible */
893 inline void setXAxisLabelVisible(bool __value)
894 {
895 if (this->xAxisLabelVisible != __value) {
896 this->xAxisLabelVisible = __value;
897 redrawPlot();
898 }
899 }
900 /** \copydoc xAxisLabelVisible */
901 inline bool getXAxisLabelVisible() const
902 {
903 return this->xAxisLabelVisible;
904 }
905 /** \copydoc yAxisLabelVisible */
906 inline void setYAxisLabelVisible(bool __value)
907 {
908 if (this->yAxisLabelVisible != __value) {
909 this->yAxisLabelVisible = __value;
910 redrawPlot();
911 }
912 }
913 /** \copydoc yAxisLabelVisible */
914 inline bool getYAxisLabelVisible() const
915 {
916 return this->yAxisLabelVisible;
917 }
918 /** \copydoc synchronizeX */
919 inline void setSynchronizeX(JKQTFastPlotter* __value)
920 {
921 if (this->synchronizeX != __value) {
922 this->synchronizeX = __value;
923 redrawPlot();
924 }
925 }
926 /** \copydoc synchronizeX */
928 {
929 return this->synchronizeX;
930 }
931 /** \copydoc synchronizeY */
932 inline void setSynchronizeY(JKQTFastPlotter* __value)
933 {
934 if (this->synchronizeY != __value) {
935 this->synchronizeY = __value;
936 redrawPlot();
937 }
938 }
939 /** \copydoc synchronizeY */
941 {
942 return this->synchronizeY;
943 }
944
945 /** \brief draw the contents onto any <a href="http://doc.qt.io/qt-5/qpainter.html">QPainter</a>, starting at (0,0), returns the size of the whole plot in \a size, if supplied with the default background color */
946 void draw(QPainter* painter, QSize* size=nullptr);
947
948 /** \brief draw the contents onto any <a href="http://doc.qt.io/qt-5/qpainter.html">QPainter</a>, starting at (0,0), returns the size of the whole plot in \a size, if supplied with the supplied\a background color */
949 void draw(QPainter* painter, QColor background, QSize* size);
950
951 Q_SIGNALS:
952 /** \brief emitted whenever the graph sizes (borders, plotWidth, plotHeight) change*/
954 /** \brief emitted whenever the graph is replotted */
956 /** \brief emitted whenever the mouse is clicked inside the plot */
957 void clicked(double x, double y);
958 /** \brief emitted whenever the mouse is clicked inside the plot */
959 void clicked(double x, double y, Qt::KeyboardModifiers modifiers);
960 /** \brief emitted whenever the mouse is double-clicked inside the plot */
961 void doubleClicked(double x, double y);
962 /** \brief emitted whenever the mouse is double-clicked inside the plot */
963 void doubleClicked(double x, double y, Qt::KeyboardModifiers modifiers);
964 /** \brief emitted whenever the mouse is clicked inside the plot */
965 void mouseMoved(double x, double y);
966 /** \brief emitted when the mouse has been dragged with the left button clicked */
967 void mouseDragged(double x_start, double y_start, double x_end, double y_end, Qt::KeyboardModifiers modifiers);
968 /** \brief emitted after the mouse has been dragged with the left button clicked */
969 void mouseDragFinished(double x_start, double y_start, double x_end, double y_end, Qt::KeyboardModifiers modifiers);
970 public Q_SLOTS:
971 /** \brief copy the current plot image to the clipboard */
972 void copyImage();
973 /** \brief replot everything (slowest possible plotting) */
975 /** \brief replot everything (slowest possible plotting) and forces a repaint calling QWidget::repaint() */
977 /** \brief replot only the data
978 *
979 * This internally calls QWidget::update(), so no immediate repaint() is forced! If you want an immediate update,
980 * call updateDataImmediate() instead!
981 */
983 /** \brief replot only the data, forces a redraw by calling QWidget::repaint() */
985
986 /** \brief set xMin*/
987 void setXMin(double value);
988 /** \brief set xMax*/
989 void setXMax(double value);
990 /** \brief set yMin*/
991 void setYMin(double value);
992 /** \brief set yMax*/
993 void setYMax(double value);
994
995
996};
997
998
999
1000
1001
1002/*! \brief base class for all plots that may be plotted by JKQTFastPlotter
1003 \ingroup jkqtfastplotter_PlotItems
1004 \deprecated The class JKQTFastPlotter and all its support classes are deprecated and will be removed in future versions.
1005*/
1007 Q_OBJECT
1008 protected:
1009 /** \brief parent class, i.e. the plotter to plot on */
1011
1012 /** \brief indicates whether the plot is visible or not */
1014 public:
1015 /** \brief class constructor */
1017
1018 /** \brief virtual class destructor */
1019 virtual ~JKQTFPPlot();
1020
1021 /** \brief set the parent of the plot */
1022 void setParent(JKQTFastPlotter* parent) { this->parent=parent; QObject::setParent(parent); }
1023
1024 /** \brief returns whether this graph is visible inside the plot */
1025 bool isVisible() const { return this->visible; }
1026
1027 /** \brief draw the graph */
1028 virtual void drawGraph(QPainter& painter)=0;
1029
1030 /** \brief draw the graph */
1031 void paint(QPainter& painter);
1032
1033 /** \brief start a replot of the parent widget */
1034 void replot();
1035 public Q_SLOTS:
1036 void setVisible(bool visible) { this->visible=visible; replot(); }
1037
1038};
1039
1040
1041
1042/*! \brief a simple line plot for JKQTFastPlotter
1043 \ingroup jkqtfastplotter_PlotItems
1044 \deprecated The class JKQTFastPlotter and all its support classes are deprecated and will be removed in future versions.
1045
1046 This class plots data as (x,y) points connected by straight lines. If errors for the y values are
1047 provided, also y+/-yerr errorlines are drawn.
1048*/
1050 public:
1051 /** \brief used to store which datatype is used for the plot data */
1054 JKQTFPLPVector
1056 protected:
1057 /** \brief number of datapoints in the plot */
1058 int N;
1059 /** \brief pointer to x-coordinate data to display */
1060 double* x;
1061 /** \brief pointer to y-coordinate data to display */
1062 double* y;
1063 /** \brief pointer to yerr-coordinate data to display */
1064 double* yerr;
1065 /** \brief pointer to x-coordinate data to display */
1066 QVector<double>* xv;
1067 /** \brief pointer to y-coordinate data to display */
1068 QVector<double>* yv;
1069 /** \brief pointer to yerr-coordinate data to display */
1070 QVector<double>* yerrv;
1071 /** \brief which type of data is used for plotting ? */
1073 /** \brief color of the graph */
1074 QColor color;
1075 /** \brief style of the graph */
1076 Qt::PenStyle style;
1077 /** \brief width of the graph (in pt) */
1078 double width;
1079 /** \brief color of the graph */
1081 /** \brief style of the graph */
1082 Qt::PenStyle errorStyle;
1083 /** \brief width of the graph (in pt) */
1085 public:
1086 /*! \brief class constructor
1087
1088 \param parent parent widget
1089 \param N number of datapoints in the plot
1090 \param x points to the x values in the plot
1091 \param y points to the y values in the plot
1092 \param color color of the plot
1093 \param style style of the graph
1094 \param width width of the plot (in pt)
1095 */
1096 JKQTFPLinePlot(JKQTFastPlotter* parent, int N, double* x, double* y, QColor color=QColor("red"), Qt::PenStyle style=Qt::SolidLine, double width=1) ;
1097 /*! \brief class constructor
1098
1099 \param parent parent widget
1100 \param x points to the x values in the plot
1101 \param y points to the y values in the plot
1102 \param color color of the plot
1103 \param style style of the graph
1104 \param width width of the plot (in pt)
1105 */
1106 JKQTFPLinePlot(JKQTFastPlotter* parent, QVector<double>* x, QVector<double>* y, QColor color=QColor("red"), Qt::PenStyle style=Qt::SolidLine, double width=1) ;
1107
1108 /** \brief draw the graph */
1109 virtual void drawGraph(QPainter& painter) override;
1110
1111 inline void setData(double* x, double* y, int N) {
1112 this->x=x;
1113 this->y=y;
1114 this->yerr=nullptr;
1115 this->N=N;
1116 datatype=JKQTFPLPPointer;
1117 replot();
1118 }
1119
1120 inline void setData(double* x, double* y, double* yerr, int N) {
1121 this->x=x;
1122 this->y=y;
1123 this->yerr=yerr;
1124 this->N=N;
1125 datatype=JKQTFPLPPointer;
1126 replot();
1127 }
1128
1129 inline void setData(QVector<double>* x, QVector<double>* y) {
1130 this->x=nullptr;
1131 this->y=nullptr;
1132 this->yerr=nullptr;
1133 this->xv=x;
1134 this->yv=y;
1135 this->yerrv=nullptr;
1136 this->N=x->size();
1137 datatype=JKQTFPLPVector;
1138 replot();
1139 }
1140
1141 inline void setData(QVector<double>* x, QVector<double>* y, QVector<double>* yerr) {
1142 this->x=nullptr;
1143 this->y=nullptr;
1144 this->yerr=nullptr;
1145 this->xv=x;
1146 this->yv=y;
1147 this->yerrv=yerr;
1148 this->N=x->size();
1149 datatype=JKQTFPLPVector;
1150 replot();
1151 }
1152
1153 inline int getN() {
1154 if (datatype==JKQTFPLPPointer)
1155 return N;
1156 if (datatype==JKQTFPLPVector)
1157 return xv->size();
1158 return N;
1159 }
1160
1161 /** \copydoc x */
1162 inline double* getX() const {
1163 return this->x;
1164 }
1165 /** \copydoc y */
1166 inline double* getY() const {
1167 return this->y;
1168 }
1169 /** \copydoc yerr */
1170 inline double* getYerr() const {
1171 return this->yerr;
1172 }
1173 /** \copydoc xv */
1174 inline QVector<double>* getXv() const {
1175 return this->xv;
1176 }
1177 /** \copydoc yv */
1178 inline QVector<double>* getYv() const {
1179 return this->yv;
1180 }
1181 /** \copydoc yerrv */
1182 inline QVector<double>* getYerrv() const {
1183 return this->yerrv;
1184 }
1185 /** \copydoc datatype */
1186 inline DataType getDatatype() const {
1187 return this->datatype;
1188 }
1189 /** \copydoc color */
1190 inline void setColor(const QColor & __value)
1191 {
1192 if (this->color != __value) {
1193 this->color = __value;
1194 replot();
1195 }
1196 }
1197 /** \copydoc color */
1198 inline QColor getColor() const
1199 {
1200 return this->color;
1201 }
1202 /** \copydoc style */
1203 inline void setStyle(Qt::PenStyle __value)
1204 {
1205 if (this->style != __value) {
1206 this->style = __value;
1207 replot();
1208 }
1209 }
1210 /** \copydoc style */
1211 inline Qt::PenStyle getStyle() const
1212 {
1213 return this->style;
1214 }
1215 /** \copydoc width */
1216 inline void setWidth(double __value)
1217 {
1218 if (this->width != __value) {
1219 this->width = __value;
1220 replot();
1221 }
1222 }
1223 /** \copydoc width */
1224 inline double getWidth() const
1225 {
1226 return this->width;
1227 }
1228 /** \copydoc errorColor */
1229 inline void setErrorLineColor(const QColor & __value)
1230 {
1231 if (this->errorColor != __value) {
1232 this->errorColor = __value;
1233 replot();
1234 }
1235 }
1236 /** \copydoc errorColor */
1237 inline QColor getErrorLineColor() const
1238 {
1239 return this->errorColor;
1240 }
1241 /** \copydoc errorStyle */
1242 inline void setErrorLineStyle(Qt::PenStyle __value)
1243 {
1244 if (this->errorStyle != __value) {
1245 this->errorStyle = __value;
1246 replot();
1247 }
1248 }
1249 /** \copydoc errorStyle */
1250 inline Qt::PenStyle getErrorLineStyle() const
1251 {
1252 return this->errorStyle;
1253 }
1254 /** \copydoc errorWidth */
1255 inline void setErrorLineWidth(double __value)
1256 {
1257 if (this->errorWidth != __value) {
1258 this->errorWidth = __value;
1259 replot();
1260 }
1261 }
1262 /** \copydoc errorWidth */
1263 inline double getErrorLineWidth() const
1264 {
1265 return this->errorWidth;
1266 }
1267};
1268
1269
1270
1271
1272/*! \brief a simple plot that draws a cross for every datapoint
1273 \ingroup jkqtfastplotter_PlotItems
1274 \deprecated The class JKQTFastPlotter and all its support classes are deprecated and will be removed in future versions.
1275
1276 This class does not support y errors!
1277*/
1279 Q_OBJECT
1280 public:
1281 /*! \brief class constructor
1282
1283 \param parent parent widget
1284 \param N number of datapoints in the plot
1285 \param x points to the x values in the plot
1286 \param y points to the y values in the plot
1287 \param color color of the plot
1288 \param style style of the graph
1289 \param width width of the plot (in pt)
1290 */
1291 JKQTFPVCrossPlot(JKQTFastPlotter* parent, int N, double* x, double* y, QColor color=QColor("red"), Qt::PenStyle style=Qt::SolidLine, double width=1) ;
1292
1293 /*! \brief class constructor
1294
1295 \param parent parent widget
1296 \param x points to the x values in the plot
1297 \param y points to the y values in the plot
1298 \param color color of the plot
1299 \param style style of the graph
1300 \param width width of the plot (in pt)
1301 */
1302 JKQTFPVCrossPlot(JKQTFastPlotter* parent, QVector<double>* x, QVector<double>* y, QColor color=QColor("red"), Qt::PenStyle style=Qt::SolidLine, double width=1) ;
1303
1304 /** \brief draw the graph */
1305 virtual void drawGraph(QPainter& painter) override;
1306
1307 /** \copydoc crossWidth */
1308 inline void setCrossWidth(double __value)
1309 {
1310 if (this->crossWidth != __value) {
1311 this->crossWidth = __value;
1312 replot();
1313 }
1314 }
1315 /** \copydoc crossWidth */
1316 inline double getCrossWidth() const
1317 {
1318 return this->crossWidth;
1319 }
1320 protected:
1321 /** \brief width of the crosses */
1323
1324};
1325
1326
1327
1328/*! \brief a simple vertical bar plot for JKQTFastPlotter
1329 \ingroup jkqtfastplotter_PlotItems
1330 \deprecated The class JKQTFastPlotter and all its support classes are deprecated and will be removed in future versions.
1331
1332 This class does not support y errors!
1333*/
1335 Q_OBJECT
1336 public:
1337 /*! \brief class constructor
1338
1339 \param parent parent widget
1340 \param N number of datapoints in the plot
1341 \param x points to the x values in the plot
1342 \param y points to the y values in the plot
1343 \param color color of the plot
1344 \param style style of the graph
1345 \param width width of the plot (in pt)
1346 */
1347 JKQTFPVBarPlot(JKQTFastPlotter* parent, int N, double* x, double* y, QColor color=QColor("red"), Qt::PenStyle style=Qt::SolidLine, double width=1) ;
1348
1349 /*! \brief class constructor
1350
1351 \param parent parent widget
1352 \param x points to the x values in the plot
1353 \param y points to the y values in the plot
1354 \param color color of the plot
1355 \param style style of the graph
1356 \param width width of the plot (in pt)
1357 */
1358 JKQTFPVBarPlot(JKQTFastPlotter* parent, QVector<double>* x, QVector<double>* y, QColor color=QColor("red"), Qt::PenStyle style=Qt::SolidLine, double width=1) ;
1359
1360 /** \brief draw the graph */
1361 virtual void drawGraph(QPainter& painter) override;
1362};
1363
1364
1365/*! \brief plot a range of x values
1366 \ingroup jkqtfastplotter_PlotItems
1367 \deprecated The class JKQTFastPlotter and all its support classes are deprecated and will be removed in future versions.
1368
1369*/
1371 Q_OBJECT
1372 protected:
1373 /** \brief start of x range */
1374 double xmin;
1375 /** \brief end of x range */
1376 double xmax;
1379 /** \brief color of the graph */
1380 QColor color;
1381 /** \brief style of the graph */
1382 Qt::PenStyle style;
1383 /** \brief width of the graph (in pt) */
1384 double width;
1385 /** \brief fill color of the graph */
1387 /** \brief fill style of the graph */
1388 Qt::BrushStyle fillStyle;
1389 public:
1390 /*! \brief class constructor
1391
1392 \param parent parent widget
1393 \param xmin range start
1394 \param xmax range end
1395 \param color color of the plot
1396 \param style style of the graph
1397 \param width width of the plot (in pt)
1398 \param fillStyle fill style of the range
1399 */
1400 JKQTFPXRangePlot(JKQTFastPlotter* parent, double xmin, double xmax, QColor color=QColor("red"), Qt::PenStyle style=Qt::SolidLine, double width=1, Qt::BrushStyle fillStyle=Qt::NoBrush) ;
1401
1402 /** \brief draw the graph */
1403 virtual void drawGraph(QPainter& painter) override;
1404
1405 /** \copydoc color */
1406 inline void setColor(const QColor & __value)
1407 {
1408 if (this->color != __value) {
1409 this->color = __value;
1410 replot();
1411 }
1412 }
1413 /** \copydoc color */
1414 inline QColor getColor() const
1415 {
1416 return this->color;
1417 }
1418 /** \copydoc fillColor */
1419 inline void setFillColor(const QColor & __value)
1420 {
1421 if (this->fillColor != __value) {
1422 this->fillColor = __value;
1423 replot();
1424 }
1425 }
1426 /** \copydoc fillColor */
1427 inline QColor getFillColor() const
1428 {
1429 return this->fillColor;
1430 }
1431 /** \copydoc fillStyle */
1432 inline void setFillStyle(Qt::BrushStyle __value)
1433 {
1434 if (this->fillStyle != __value) {
1435 this->fillStyle = __value;
1436 replot();
1437 }
1438 }
1439 /** \copydoc fillStyle */
1440 inline Qt::BrushStyle getFillStyle() const
1441 {
1442 return this->fillStyle;
1443 }
1444 /** \copydoc style */
1445 inline void setStyle(Qt::PenStyle __value)
1446 {
1447 if (this->style != __value) {
1448 this->style = __value;
1449 replot();
1450 }
1451 }
1452 /** \copydoc style */
1453 inline Qt::PenStyle getStyle() const
1454 {
1455 return this->style;
1456 }
1457 /** \copydoc width */
1458 inline void setWidth(double __value)
1459 {
1460 if (this->width != __value) {
1461 this->width = __value;
1462 replot();
1463 }
1464 }
1465 /** \copydoc width */
1466 inline double getWidth() const
1467 {
1468 return this->width;
1469 }
1470 /** \copydoc xmin */
1471 inline double getXmin() const {
1472 return this->xmin;
1473 }
1474 /** \copydoc xmax */
1475 inline double getXmax() const {
1476 return this->xmax;
1477 }
1478 /** \copydoc centerline */
1479 inline double getCenterline() const {
1480 return this->centerline;
1481 }
1482 /** \copydoc showCenterline */
1483 inline void setShowCenterline(bool __value)
1484 {
1485 if (this->showCenterline != __value) {
1486 this->showCenterline = __value;
1487 replot();
1488 }
1489 }
1490 /** \copydoc showCenterline */
1491 inline bool getShowCenterline() const
1492 {
1493 return this->showCenterline;
1494 }
1495 public Q_SLOTS:
1496 void setCenterline(int centerline) {
1497 if (this->centerline!=centerline) {
1498 this->centerline=centerline;
1499 replot();
1500 }
1501 }
1502 void setXmin(double xmin) {
1503 if (this->xmin!=xmin) {
1504 this->xmin=xmin;
1505 replot();
1506 }
1507 }
1508 void setXmax(double xmax) {
1509 if (this->xmax!=xmax) {
1510 this->xmax=xmax;
1511 replot();
1512 }
1513 }
1514 void setXmin(int xmin) {
1515 if (this->xmin!=xmin) {
1516 this->xmin=xmin;
1517 replot();
1518 }
1519 }
1520 void setXmax(int xmax) {
1521 if (this->xmax!=xmax) {
1522 this->xmax=xmax;
1523 replot();
1524 }
1525 }
1526};
1527
1528
1529
1530/*! \brief plot a range of x values
1531 \ingroup jkqtfastplotter_PlotItems
1532 \deprecated The class JKQTFastPlotter and all its support classes are deprecated and will be removed in future versions.
1533
1534*/
1536 Q_OBJECT
1537 protected:
1538 /** \brief start of x range */
1539 double ymin;
1540 /** \brief end of x range */
1541 double ymax;
1544 /** \brief color of the graph */
1545 QColor color;
1546 /** \brief style of the graph */
1547 Qt::PenStyle style;
1548 /** \brief width of the graph (in pt) */
1549 double width;
1550 /** \brief fill color of the graph */
1552 /** \brief fill style of the graph */
1553 Qt::BrushStyle fillStyle;
1554 public:
1555 /*! \brief class constructor
1556
1557 \param parent parent widget
1558 \param ymin range start
1559 \param ymax range end
1560 \param color color of the plot
1561 \param style style of the graph
1562 \param width width of the plot (in pt)
1563 \param fillStyle fill style of the range
1564 */
1565 JKQTFPYRangePlot(JKQTFastPlotter* parent, double ymin, double ymax, QColor color=QColor("red"), Qt::PenStyle style=Qt::SolidLine, double width=1, Qt::BrushStyle fillStyle=Qt::NoBrush) ;
1566
1567 /** \brief draw the graph */
1568 virtual void drawGraph(QPainter& painter) override;
1569
1570 /** \copydoc color */
1571 inline void setColor(const QColor & __value)
1572 {
1573 if (this->color != __value) {
1574 this->color = __value;
1575 replot();
1576 }
1577 }
1578 /** \copydoc color */
1579 inline QColor getColor() const
1580 {
1581 return this->color;
1582 }
1583 /** \copydoc fillColor */
1584 inline void setFillColor(const QColor & __value)
1585 {
1586 if (this->fillColor != __value) {
1587 this->fillColor = __value;
1588 replot();
1589 }
1590 }
1591 /** \copydoc fillColor */
1592 inline QColor getFillColor() const
1593 {
1594 return this->fillColor;
1595 }
1596 /** \copydoc fillStyle */
1597 inline void setFillStyle(Qt::BrushStyle __value)
1598 {
1599 if (this->fillStyle != __value) {
1600 this->fillStyle = __value;
1601 replot();
1602 }
1603 }
1604 /** \copydoc fillStyle */
1605 inline Qt::BrushStyle getFillStyle() const
1606 {
1607 return this->fillStyle;
1608 }
1609 /** \copydoc style */
1610 inline void setStyle(Qt::PenStyle __value)
1611 {
1612 if (this->style != __value) {
1613 this->style = __value;
1614 replot();
1615 }
1616 }
1617 /** \copydoc style */
1618 inline Qt::PenStyle getStyle() const
1619 {
1620 return this->style;
1621 }
1622 /** \copydoc width */
1623 inline void setWidth(double __value)
1624 {
1625 if (this->width != __value) {
1626 this->width = __value;
1627 replot();
1628 }
1629 }
1630 /** \copydoc width */
1631 inline double getWidth() const
1632 {
1633 return this->width;
1634 }
1635 /** \copydoc ymin */
1636 inline double getYmin() const {
1637 return this->ymin;
1638 }
1639 /** \copydoc ymax */
1640 inline double getYmax() const {
1641 return this->ymax;
1642 }
1643 /** \copydoc centerline */
1644 inline double getCenterline() const {
1645 return this->centerline;
1646 }
1647 /** \copydoc showCenterline */
1648 inline void setShowCenterline(bool __value)
1649 {
1650 if (this->showCenterline != __value) {
1651 this->showCenterline = __value;
1652 replot();
1653 }
1654 }
1655 /** \copydoc showCenterline */
1656 inline bool getShowCenterline() const
1657 {
1658 return this->showCenterline;
1659 }
1660 public Q_SLOTS:
1661 void setCenterline(int centerline) {
1662 if (this->centerline!=centerline) {
1663 this->centerline=centerline;
1664 replot();
1665 }
1666 }
1667 void setYmin(double xmin) {
1668 if (this->ymin!=xmin) {
1669 this->ymin=xmin;
1670 replot();
1671 }
1672 }
1673 void setYmax(double xmax) {
1674 if (this->ymax!=xmax) {
1675 this->ymax=xmax;
1676 replot();
1677 }
1678 }
1679 void setYmin(int xmin) {
1680 if (this->ymin!=xmin) {
1681 this->ymin=xmin;
1682 replot();
1683 }
1684 }
1685 void setYmax(int xmax) {
1686 if (this->ymax!=xmax) {
1687 this->ymax=xmax;
1688 replot();
1689 }
1690 }
1691};
1692
1693
1694
1695/*! \brief a plot of a QImage
1696 \ingroup jkqtfastplotter_PlotItems
1697 \deprecated The class JKQTFastPlotter and all its support classes are deprecated and will be removed in future versions.
1698*/
1700 Q_OBJECT
1701 protected:
1702 /** \brief image to plot */
1703 QImage* image;
1704 /** \brief minimum x value of the image */
1705 double xmin;
1706 /** \brief maximum x value of the image */
1707 double xmax;
1708 /** \brief minimum x value of the image */
1709 double ymin;
1710 /** \brief maximum x value of the image */
1711 double ymax;
1712 public:
1713 /*! \brief class constructor
1714
1715 */
1716 JKQTFPQImagePlot(JKQTFastPlotter* parent, QImage* image, double xmin, double xmax, double ymin, double ymax) ;
1717
1718 JKQTFPQImagePlot(JKQTFastPlotter* parent, QImage* image);
1719
1720 /** \brief draw the graph */
1721 virtual void drawGraph(QPainter& painter) override;
1722
1723 /** \copydoc image */
1724 inline void setImage(QImage* __value)
1725 {
1726 if (this->image != __value) {
1727 this->image = __value;
1728 replot();
1729 }
1730 }
1731 /** \copydoc image */
1732 inline QImage* getImage() const
1733 {
1734 return this->image;
1735 }
1736 /** \copydoc xmin */
1737 inline void setXmin(double __value)
1738 {
1739 if (this->xmin != __value) {
1740 this->xmin = __value;
1741 replot();
1742 }
1743 }
1744 /** \copydoc xmin */
1745 inline double getXmin() const
1746 {
1747 return this->xmin;
1748 }
1749 /** \copydoc xmax */
1750 inline void setXmax(double __value)
1751 {
1752 if (this->xmax != __value) {
1753 this->xmax = __value;
1754 replot();
1755 }
1756 }
1757 /** \copydoc xmax */
1758 inline double getXmax() const
1759 {
1760 return this->xmax;
1761 }
1762 /** \copydoc ymin */
1763 inline void setYmin(double __value)
1764 {
1765 if (this->ymin != __value) {
1766 this->ymin = __value;
1767 replot();
1768 }
1769 }
1770 /** \copydoc ymin */
1771 inline double getYmin() const
1772 {
1773 return this->ymin;
1774 }
1775 /** \copydoc ymax */
1776 inline void setYmax(double __value)
1777 {
1778 if (this->ymax != __value) {
1779 this->ymax = __value;
1780 replot();
1781 }
1782 }
1783 /** \copydoc ymax */
1784 inline double getYmax() const
1785 {
1786 return this->ymax;
1787 }
1788};
1789
1790
1791
1792/*!
1793 \brief An enum for selecting the palette for coloring
1794 \ingroup jkqtfastplotter_tools
1795 \deprecated The class JKQTFastPlotter and all its support classes are deprecated and will be removed in future versions.
1796
1797 Here, the color palettes are illustrated (left is the color for the minimum and right for the maximum).
1798 */
1800 JKQTFP_RED=0, /*!< \image html palettes/palette_red.png */
1801 JKQTFP_INVERTEDRED=1, /*!< \image html palettes/palette_invred.png */
1802 JKQTFP_GREEN=2, /*!< \image html palettes/palette_green.png */
1803 JKQTFP_INVERTEDGREEN=3, /*!< \image html palettes/palette_invgreen.png */
1804 JKQTFP_BLUE=4, /*!< \image html palettes/palette_blue.png */
1805 JKQTFP_INVERTEDBLUE=5, /*!< \image html palettes/palette_invblue.png */
1806 JKQTFP_GRAY=6, /*!< \image html palettes/palette_gray.png */
1807 JKQTFP_INVERTEDGRAY=7, /*!< \image html palettes/palette_invgray.png */
1808 JKQTFP_MATLAB=8, /*!< \image html palettes/palette_Matlab.png */
1809 JKQTFP_RYGB=9, /*!< \image html palettes/palette_RYGB.png */
1810 JKQTFP_HSV=10, /*!< \image html palettes/palette_HSV.png */
1811 JKQTFP_INVERTED_HSV=11, /*!< \image html palettes/palette_invHSV.png */
1812 JKQTFP_RAINBOW=12, /*!< \image html palettes/palette_rainbow.png */
1813 JKQTFP_HOT=13, /*!< \image html palettes/palette_AFMhot.png */
1814 JKQTFP_OCEAN=14, /*!< \image html palettes/palette_ocean.png */
1815 JKQTFP_TRAFFICLIGHT=15, /*!< \image html palettes/palette_trafficlight.png */
1816 JKQTFP_BLUEMAGENTAYELLOW=16, /*!< \image html palettes/palette_BlMaYe.png */
1817 JKQTFP_BLUEYELLOW=17, /*!< \image html palettes/palette_BlYe.png */
1818 JKQTFP_CYAN=18 /*!< \image html palettes/palette_cyan.png */
1820
1821/*! \brief datatype for an image plotpalette for coloring
1822 \ingroup jkqtfastplotter_tools
1823 \deprecated The class JKQTFastPlotter and all its support classes are deprecated and will be removed in future versions.
1824
1825 Here, the color palettes are illustrated (left is the color for the minimum and right for the maximum).
1826 */
1828 JKQTFP_uint8=0, /*!< \brief 8 bit int */
1829 JKQTFP_uint16=1, /*!< \brief 16 bit int */
1830 JKQTFP_uint32=2, /*!< \brief 32 bit int */
1831 JKQTFP_float=3, /*!< \brief float */
1832 JKQTFP_double=4, /*!< \brief double */
1833 JKQTFP_int64=5 /*!< \brief 64 bit signed int */
1835
1836
1837
1838/*! \brief convert a 2D image (as 1D array) into a QImage with given palette (see JKQTFPColorPalette)
1839 \ingroup jkqtfastplotter_tools
1840 \deprecated The class JKQTFastPlotter and all its support classes are deprecated and will be removed in future versions.
1841
1842 This method uses lookup tables which are saved as static variables to convert the 2D array into
1843 an image. The luts are only created once, and stored then, so mor CPU time is saved. The precompiler define
1844 JKQTFastPlotter::LUTSIZE sets the size of the LUTs. Note that if you don't use a specific color palette,
1845 the according LUT won't be calculated and stored!
1846*/
1847template <class T>
1848inline void JKQTFPimagePlot_array2image(T* dbl, int width, int height, QImage &img, JKQTFPColorPalette palette, double minColor, double maxColor)
1849{
1850 if (!dbl)
1851 return;
1852
1853 #ifdef DEBUG_TIMING
1854 JKQTPHighResTimer timer;
1855 double time_sum=0;
1856 double time_gt=0;
1857 std::cout<<" timing JKQTFPimagePlot_array2image:\n";
1858 timer.start();
1859 #endif
1860 //std::cout<<"color range: "<<minColor<<"..."<<maxColor<<std::endl;
1861 double min = *dbl;
1862 double max = *dbl;
1863 if (minColor == maxColor) {
1864 for (int i=1; i<width*height; ++i)
1865 {
1866 T v=dbl[i];
1867 if (v < min)
1868 min = v;
1869 else if (v > max)
1870 max = v;
1871 }
1872 } else {
1873 min = minColor;
1874 max = maxColor;
1875 }
1876 #ifdef DEBUG_TIMING
1877 time_gt=timer.getTime();
1878 time_sum+=time_gt;
1879 std::cout<<" finding min&max: "<<time_gt/1000.0<<" ms\n";
1880 timer.start();
1881 #endif
1882 //std::cout<<"minColor="<<minColor<<" maxColor="<<maxColor<<" min="<<min<<" max="<<max<<"\n";
1883
1884 double delta=max-min;
1885
1886 QRgb* lut_used=nullptr;
1887 static QRgb* lut_red=nullptr;
1888 static QRgb* lut_green=nullptr;
1889 static QRgb* lut_blue=nullptr;
1890 static QRgb* lut_gray=nullptr;
1891 static QRgb* lut_invred=nullptr;
1892 static QRgb* lut_invgreen=nullptr;
1893 static QRgb* lut_invblue=nullptr;
1894 static QRgb* lut_invgray=nullptr;
1895 static QRgb* lut_matlab=nullptr;
1896 static QRgb* lut_rygb=nullptr;
1897 static QRgb* lut_hsv=nullptr;
1898 static QRgb* lut_invhsv=nullptr;
1899 static QRgb* lut_rainbow=nullptr;
1900 static QRgb* lut_hot=nullptr;
1901 static QRgb* lut_ocean=nullptr;
1902 static QRgb* lut_trafficlight=nullptr;
1903 static QRgb* lut_bluemagentayellow=nullptr;
1904 static QRgb* lut_blueyellow=nullptr;
1905 static QRgb* lut_cyan=nullptr;
1906
1907
1908 img = QImage(width, height, QImage::Format_ARGB32_Premultiplied);
1909 if (min == max)
1910 img.fill(0);
1911 else
1912 {
1913 if (palette == JKQTFP_RED)
1914 {
1915 QRgb** plut=&lut_red;
1916 if ((*plut)==nullptr) {
1917 (*plut)=static_cast<QRgb*>(malloc((JKQTFastPlotter::LUTSIZE+2)*sizeof(QRgb)));
1918 if ((*plut)!=nullptr) {
1919 for (size_t l=0; l<=JKQTFastPlotter::LUTSIZE; l++) {
1920 double v=l/static_cast<double>(JKQTFastPlotter::LUTSIZE);
1921 (*plut)[l]=qRgb(static_cast<int>(255.0*v), 0, 0);
1922 }
1923 }
1924 }
1925 lut_used=(*plut);
1926
1927 }
1928 else if (palette == JKQTFP_GREEN)
1929 {
1930 QRgb** plut=&lut_green;
1931 if ((*plut)==nullptr) {
1932 (*plut)=static_cast<QRgb*>(malloc((JKQTFastPlotter::LUTSIZE+2)*sizeof(QRgb)));
1933 if ((*plut)!=nullptr) {
1934 for (size_t l=0; l<=JKQTFastPlotter::LUTSIZE; l++) {
1935 double v=l/static_cast<double>(JKQTFastPlotter::LUTSIZE);
1936 (*plut)[l]=qRgb(0, static_cast<int>(255.0*v), 0);
1937 }
1938 }
1939 }
1940 lut_used=(*plut);
1941
1942 }
1943 else if (palette == JKQTFP_BLUE)
1944 {
1945 QRgb** plut=&lut_blue;
1946 if ((*plut)==nullptr) {
1947 (*plut)=static_cast<QRgb*>(malloc((JKQTFastPlotter::LUTSIZE+2)*sizeof(QRgb)));
1948 if ((*plut)!=nullptr) {
1949 for (size_t l=0; l<=JKQTFastPlotter::LUTSIZE; l++) {
1950 double v=l/static_cast<double>(JKQTFastPlotter::LUTSIZE);
1951 (*plut)[l]=qRgb(0, 0, static_cast<int>(255.0*v));
1952 }
1953 }
1954 }
1955 lut_used=(*plut);
1956
1957 }
1958
1959
1960 else if (palette == JKQTFP_GRAY)
1961 {
1962 QRgb** plut=&lut_gray;
1963 if ((*plut)==nullptr) {
1964 (*plut)=static_cast<QRgb*>(malloc((JKQTFastPlotter::LUTSIZE+2)*sizeof(QRgb)));
1965 if ((*plut)!=nullptr) {
1966 for (size_t l=0; l<=JKQTFastPlotter::LUTSIZE; l++) {
1967 double v=l/static_cast<double>(JKQTFastPlotter::LUTSIZE);
1968 (*plut)[l]=qRgb(static_cast<int>(255.0*v),
1969 static_cast<int>(255.0*v),
1970 static_cast<int>(255.0*v));
1971 }
1972 }
1973 }
1974 lut_used=(*plut);
1975 }
1976
1977 else if (palette == JKQTFP_INVERTEDRED)
1978 {
1979 QRgb** plut=&lut_invred;
1980 if ((*plut)==nullptr) {
1981 (*plut)=static_cast<QRgb*>(malloc((JKQTFastPlotter::LUTSIZE+2)*sizeof(QRgb)));
1982 if ((*plut)!=nullptr) {
1983 for (size_t l=0; l<=JKQTFastPlotter::LUTSIZE; l++) {
1984 double v=l/static_cast<double>(JKQTFastPlotter::LUTSIZE);
1985 (*plut)[l]=qRgb(static_cast<int>(255.0*(1.0-v)), 0, 0);
1986 }
1987 }
1988 }
1989 lut_used=(*plut);
1990
1991 }
1992 else if (palette == JKQTFP_INVERTEDGREEN)
1993 {
1994 QRgb** plut=&lut_invgreen;
1995 if ((*plut)==nullptr) {
1996 (*plut)=static_cast<QRgb*>(malloc((JKQTFastPlotter::LUTSIZE+2)*sizeof(QRgb)));
1997 if ((*plut)!=nullptr) {
1998 for (size_t l=0; l<=JKQTFastPlotter::LUTSIZE; l++) {
1999 double v=l/static_cast<double>(JKQTFastPlotter::LUTSIZE);
2000 (*plut)[l]=qRgb(0, static_cast<int>(255.0*(1.0-v)), 0);
2001 }
2002 }
2003 }
2004 lut_used=(*plut);
2005 }
2006 else if (palette == JKQTFP_INVERTEDBLUE)
2007 {
2008 QRgb** plut=&lut_invblue;
2009 if ((*plut)==nullptr) {
2010 (*plut)=static_cast<QRgb*>(malloc((JKQTFastPlotter::LUTSIZE+2)*sizeof(QRgb)));
2011 if ((*plut)!=nullptr) {
2012 for (size_t l=0; l<=JKQTFastPlotter::LUTSIZE; l++) {
2013 double v=l/static_cast<double>(JKQTFastPlotter::LUTSIZE);
2014 (*plut)[l]=qRgb(0, 0, static_cast<int>(255.0*(1.0-v)));
2015 }
2016 }
2017 }
2018 lut_used=(*plut);
2019 }
2020 else if (palette == JKQTFP_INVERTEDGRAY)
2021 {
2022 QRgb** plut=&lut_invgray;
2023 if ((*plut)==nullptr) {
2024 (*plut)=static_cast<QRgb*>(malloc((JKQTFastPlotter::LUTSIZE+2)*sizeof(QRgb)));
2025 if ((*plut)!=nullptr) {
2026 for (size_t l=0; l<=JKQTFastPlotter::LUTSIZE; l++) {
2027 double v=1.0-(l/static_cast<double>(JKQTFastPlotter::LUTSIZE));
2028 (*plut)[l]=qRgb(static_cast<int>(255.0*v),
2029 static_cast<int>(255.0*v),
2030 static_cast<int>(255.0*v));
2031 }
2032 }
2033 }
2034 lut_used=(*plut);
2035 }
2036
2037 else if (palette == JKQTFP_MATLAB)
2038 {
2039 QRgb** plut=&lut_matlab;
2040 if ((*plut)==nullptr) {
2041 (*plut)=static_cast<QRgb*>(malloc((JKQTFastPlotter::LUTSIZE+2)*sizeof(QRgb)));
2042 if ((*plut)!=nullptr) {
2043 for (size_t l=0; l<=JKQTFastPlotter::LUTSIZE; l++) {
2044 double v=l/static_cast<double>(JKQTFastPlotter::LUTSIZE);
2045 double r = 382.5 - 1020.0 * std::abs(v - 0.75);
2046 if (r > 255.0)
2047 r = 255.0;
2048 else if (r < 0.0)
2049 r = 0.0;
2050
2051 double g = 382.5 - 1020.0 * std::abs(v - 0.5);
2052 if (g > 255.0)
2053 g = 255.0;
2054 else if (g < 0.0)
2055 g = 0.0;
2056
2057 double b = 382.5 - 1020.0 * std::abs(v - 0.25);
2058 if (b > 255.0)
2059 b = 255.0;
2060 else if (b < 0.0)
2061 b = 0.0;
2062
2063 (*plut)[l]=qRgb(static_cast<int>(r), static_cast<int>(g), static_cast<int>(b));
2064 }
2065 }
2066 }
2067 lut_used=(*plut);
2068
2069 }
2070 else if (palette == JKQTFP_RYGB) //gnuplot: 30,-13,-23
2071 {
2072 QRgb** plut=&lut_rygb;
2073 if ((*plut)==nullptr) {
2074 (*plut)=static_cast<QRgb*>(malloc((JKQTFastPlotter::LUTSIZE+2)*sizeof(QRgb)));
2075 if ((*plut)!=nullptr) {
2076 for (size_t l=0; l<=JKQTFastPlotter::LUTSIZE; l++) {
2077 double v=l/static_cast<double>(JKQTFastPlotter::LUTSIZE);
2078 double r = 796.875*v - 199.21875;
2079 if (r > 255.0)
2080 r = 255.0;
2081 else if (r < 0.0)
2082 r = 0.0;
2083
2084 double g = 255.0 * std::sin(JKQTPSTATISTICS_PI*v);
2085
2086 double b = 255.0 - 765.0 * v;
2087 if (b < 0.0)
2088 b = 0.0;
2089 (*plut)[l]=qRgb(static_cast<int>(r), static_cast<int>(g), static_cast<int>(b));
2090 }
2091 }
2092 }
2093 lut_used=(*plut);
2094
2095 }
2096 else if (palette == JKQTFP_HSV)
2097 {
2098 QRgb** plut=&lut_hsv;
2099 if ((*plut)==nullptr) {
2100 (*plut)=static_cast<QRgb*>(malloc((JKQTFastPlotter::LUTSIZE+2)*sizeof(QRgb)));
2101 if ((*plut)!=nullptr) {
2102 for (size_t l=0; l<=JKQTFastPlotter::LUTSIZE; l++) {
2103 double v=l/static_cast<double>(JKQTFastPlotter::LUTSIZE);
2104 int h = static_cast<int>(floor(6*v));
2105 double f = 6*v-double(h);
2106
2107 switch (h)
2108 {
2109 case 0: (*plut)[l]=qRgb(255, static_cast<int>(255.0*f), 0); break;
2110 case 1: (*plut)[l]=qRgb(static_cast<int>(255.0*(1-f)), 255, 0); break;
2111 case 2: (*plut)[l]=qRgb(0, 255, static_cast<int>(255.0*f)); break;
2112 case 3: (*plut)[l]=qRgb(0, static_cast<int>(255.0*(1-f)), 255); break;
2113 case 4: (*plut)[l]=qRgb(static_cast<int>(255.0*f), 0, 255); break;
2114 case 5: (*plut)[l]=qRgb(255, 0, static_cast<int>(255.0*(1-f))); break;
2115 case 6: (*plut)[l]=qRgb(255, static_cast<int>(255.0*f), 0); break;
2116 }
2117 }
2118 }
2119 }
2120 lut_used=(*plut);
2121 }
2122 else if (palette == JKQTFP_INVERTED_HSV)
2123 {
2124 QRgb** plut=&lut_invhsv;
2125 if ((*plut)==nullptr) {
2126 (*plut)=static_cast<QRgb*>(malloc((JKQTFastPlotter::LUTSIZE+2)*sizeof(QRgb)));
2127 if ((*plut)!=nullptr) {
2128 for (size_t l=0; l<=JKQTFastPlotter::LUTSIZE; l++) {
2129 double v=l/static_cast<double>(JKQTFastPlotter::LUTSIZE);
2130 int h = static_cast<int>(floor(6.0-6.0*v));
2131 double f = 6.0-6.0*v-double(h);
2132
2133 switch (h)
2134 {
2135 case 0: (*plut)[l]=qRgb(255, static_cast<int>(255.0*f), 0); break;
2136 case 1: (*plut)[l]=qRgb(static_cast<int>(255.0*(1-f)), 255, 0); break;
2137 case 2: (*plut)[l]=qRgb(0, 255, static_cast<int>(255.0*f)); break;
2138 case 3: (*plut)[l]=qRgb(0, static_cast<int>(255.0*(1-f)), 255); break;
2139 case 4: (*plut)[l]=qRgb(static_cast<int>(255.0*f), 0, 255); break;
2140 case 5: (*plut)[l]=qRgb(255, 0, static_cast<int>(255.0*(1-f))); break;
2141 case 6: (*plut)[l]=qRgb(255, static_cast<int>(255.0*f), 0); break;
2142 }
2143 }
2144 }
2145 }
2146 lut_used=(*plut);
2147
2148 }
2149 else if (palette == JKQTFP_RAINBOW) //gnuplot: 33,13,10
2150 {
2151 if (lut_rainbow==nullptr) {
2152 lut_rainbow=static_cast<QRgb*>(malloc((JKQTFastPlotter::LUTSIZE+2)*sizeof(QRgb)));
2153 //std::cout<<"!!! creating rainbow lut\n";
2154 if (lut_rainbow!=nullptr) {
2155 for (size_t l=0; l<=JKQTFastPlotter::LUTSIZE; l++) {
2156 double v=l/static_cast<double>(JKQTFastPlotter::LUTSIZE);
2157 double r = 255.0*std::abs(2.0*v-0.5);
2158 if (r > 255.0)
2159 r = 255.0;
2160
2161 double g = 255.0*sin(JKQTPSTATISTICS_PI*v);
2162
2163 double b = 255.0*cos(0.5*JKQTPSTATISTICS_PI*v);
2164
2165 lut_rainbow[l]=qRgb(static_cast<int>(r), static_cast<int>(g), static_cast<int>(b));
2166 }
2167 }
2168 }
2169 lut_used=lut_rainbow;
2170 }
2171 else if (palette == JKQTFP_HOT) //gnuplot: 21,22,23
2172 {
2173 QRgb** plut=&lut_hot;
2174 if ((*plut)==nullptr) {
2175 (*plut)=static_cast<QRgb*>(malloc((JKQTFastPlotter::LUTSIZE+2)*sizeof(QRgb)));
2176 if ((*plut)!=nullptr) {
2177 for (size_t l=0; l<=JKQTFastPlotter::LUTSIZE; l++) {
2178 double v=l/static_cast<double>(JKQTFastPlotter::LUTSIZE);
2179 double r = 765.0*v;
2180 if (r > 255.0)
2181 r = 255.0;
2182
2183 double g = 765.0*v-255.0;
2184 if (g > 255.0)
2185 g = 255.0;
2186 else if (g < 0.0)
2187 g = 0.0;
2188
2189 double b = 765.0*v-510.0;
2190 if (b < 0.0)
2191 b = 0.0;
2192 (*plut)[l]=qRgb(static_cast<int>(r), static_cast<int>(g), static_cast<int>(b));
2193 }
2194 }
2195 }
2196 lut_used=(*plut);
2197 }
2198 else if (palette == JKQTFP_OCEAN) //gnuplot: 23,28,3
2199 {
2200 QRgb** plut=&lut_ocean;
2201 if ((*plut)==nullptr) {
2202 (*plut)=static_cast<QRgb*>(malloc((JKQTFastPlotter::LUTSIZE+2)*sizeof(QRgb)));
2203 if ((*plut)!=nullptr) {
2204 for (size_t l=0; l<=JKQTFastPlotter::LUTSIZE; l++) {
2205 double v=l/static_cast<double>(JKQTFastPlotter::LUTSIZE);
2206 double r = 765.0*v-510.0;
2207 if (r < 0.0)
2208 r = 0.0;
2209
2210 double g = std::abs(382.5*v-127.5);
2211
2212 double b = 255.0*v;
2213 (*plut)[l]=qRgb(static_cast<int>(r), static_cast<int>(g), static_cast<int>(b));
2214 }
2215 }
2216 }
2217 lut_used=(*plut);
2218 }
2219 else if (palette == JKQTFP_BLUEMAGENTAYELLOW) //gnuplot: 30,31,32
2220 {
2221 QRgb** plut=&lut_bluemagentayellow;
2222 if ((*plut)==nullptr) {
2223 (*plut)=static_cast<QRgb*>(malloc((JKQTFastPlotter::LUTSIZE+2)*sizeof(QRgb)));
2224 if ((*plut)!=nullptr) {
2225 for (size_t l=0; l<=JKQTFastPlotter::LUTSIZE; l++) {
2226 double v=l/static_cast<double>(JKQTFastPlotter::LUTSIZE);
2227 double r = (v/0.32-0.78125);
2228 if (r < 0.0) r = 0.0;
2229 if (r > 1.0) r = 1.0;
2230
2231 double g = 2.0*v-0.84;
2232 if (g < 0.0) g = 0.0;
2233 if (g > 1.0) g = 1.0;
2234
2235 double b = 4.0*v;
2236 if (b>1 || b<0) b = -2.0*v+1.84;
2237 if (b>1 || b<0) b = v/0.08-11.5;
2238 if (b>1 || b<0) b=1;
2239
2240 if (b < 0.0) b = 0.0;
2241 if (b > 1.0) b = 1.0;
2242 (*plut)[l]=qRgb(static_cast<int>(255.0*r), static_cast<int>(255.0*g), static_cast<int>(255.0*b));
2243 }
2244 }
2245 }
2246 lut_used=(*plut);
2247 }
2248 else if (palette == JKQTFP_BLUEYELLOW) //gnuplot: 8,9,10
2249 {
2250 QRgb** plut=&lut_blueyellow;
2251 if ((*plut)==nullptr) {
2252 (*plut)=static_cast<QRgb*>(malloc((JKQTFastPlotter::LUTSIZE+2)*sizeof(QRgb)));
2253 if ((*plut)!=nullptr) {
2254 for (size_t l=0; l<=JKQTFastPlotter::LUTSIZE; l++) {
2255 double v=l/static_cast<double>(JKQTFastPlotter::LUTSIZE);
2256 double r = sqrt(sqrt(v));
2257 if (r < 0.0) r = 0.0;
2258 if (r > 1.0) r = 1.0;
2259
2260 double g = sin(JKQTPSTATISTICS_PI/2.0*v);
2261 if (g < 0.0) g = 0.0;
2262 if (g > 1.0) g = 1.0;
2263
2264 double b = cos(JKQTPSTATISTICS_PI/2.0*v);
2265 if (b < 0.0) b = 0.0;
2266 if (b > 1.0) b = 1.0;
2267
2268 (*plut)[l]=qRgb(static_cast<int>(255.0*r), static_cast<int>(255.0*g), static_cast<int>(255.0*b));
2269 }
2270 }
2271 }
2272 lut_used=(*plut);
2273
2274 }
2275 else if (palette == JKQTFP_CYAN)
2276 {
2277 QRgb** plut=&lut_cyan;
2278 if ((*plut)==nullptr) {
2279 (*plut)=static_cast<QRgb*>(malloc((JKQTFastPlotter::LUTSIZE+2)*sizeof(QRgb)));
2280 if ((*plut)!=nullptr) {
2281 for (size_t l=0; l<=JKQTFastPlotter::LUTSIZE; l++) {
2282 double v=l/static_cast<double>(JKQTFastPlotter::LUTSIZE);
2283 double r = v*0.5;
2284 if (r < 0.0) r = 0.0;
2285 if (r > 1.0) r = 1.0;
2286
2287 double g = v;
2288 if (g < 0.0) g = 0.0;
2289 if (g > 1.0) g = 1.0;
2290
2291 double b = v;
2292 if (b < 0.0) b = 0.0;
2293 if (b > 1.0) b = 1.0;
2294 (*plut)[l]=qRgb(static_cast<int>(255.0*r), static_cast<int>(255.0*g), static_cast<int>(255.0*b));
2295 }
2296 }
2297 }
2298 lut_used=(*plut);
2299
2300 }
2301 else if (palette == JKQTFP_TRAFFICLIGHT)
2302 {
2303 QRgb** plut=&lut_trafficlight;
2304 if ((*plut)==nullptr) {
2305 (*plut)=static_cast<QRgb*>(malloc((JKQTFastPlotter::LUTSIZE+2)*sizeof(QRgb)));
2306 if ((*plut)!=nullptr) {
2307 for (size_t l=0; l<=JKQTFastPlotter::LUTSIZE; l++) {
2308 double v=l/static_cast<double>(JKQTFastPlotter::LUTSIZE);
2309 double r = (v < 0.5) ? 128.0*sin(JKQTPSTATISTICS_PI*(2.0*v-0.5))+128.0 : 255.0;
2310 if (r > 255.0)
2311 r = 255.0;
2312
2313 double g = (v < 0.5) ? 512.0*v+128.0 : 512.0-512.0*v;
2314 if (g > 255.0)
2315 g = 255.0;
2316 (*plut)[l]=qRgb(static_cast<int>(r), static_cast<int>(g), 0);
2317 }
2318 }
2319 }
2320 lut_used=(*plut);
2321
2322 }
2323
2324 #ifdef DEBUG_TIMING
2325 time_gt=timer.getTime();
2326 time_sum+=time_gt;
2327 std::cout<<" calculated/found LUT: "<<time_gt/1000.0<<" ms\n";
2328 timer.start();
2329 #endif
2330 if (lut_used!=nullptr) {
2331 // LUT found: collor the image accordingly
2332 for (int j=0; j<height; ++j) {
2333 QRgb* line=reinterpret_cast<QRgb *>(img.scanLine(height-1-j));
2334 for (int i=0; i<width; ++i) {
2335 int v = static_cast<int>((dbl[j*width+i]-min)/delta*static_cast<double>(JKQTFastPlotter::LUTSIZE));
2336 v = (v < 0) ? 0 : ( (v > static_cast<int>(JKQTFastPlotter::LUTSIZE)) ? static_cast<int>(JKQTFastPlotter::LUTSIZE) : v);
2337 line[i]=lut_used[v];
2338 }
2339 }
2340 } else {
2341 // no LUT found: paint a black image!
2342 img.fill(0);
2343 }
2344 }
2345 #ifdef DEBUG_TIMING
2346 time_gt=timer.getTime();
2347 time_sum+=time_gt;
2348 std::cout<<" creating colored image: "<<time_gt/1000.0<<" ms\n";
2349 timer.start();
2350 #endif
2351 #ifdef DEBUG_TIMING
2352 time_gt=timer.getTime();
2353 time_sum+=time_gt;
2354 std::cout<<" sum: "<<time_sum/1000.0<<" ms\n";
2355 timer.start();
2356 #endif
2357};
2358
2359/*! \brief get list with all available palettes
2360 \ingroup jkqtfastplotter_tools
2361 \see JKQTFPimagePlot_array2image()
2362 \deprecated The class JKQTFastPlotter and all its support classes are deprecated and will be removed in future versions.
2363 */
2365/*! \brief get QIcon representing the given palette
2366 \ingroup jkqtfastplotter_tools
2367 \see JKQTFPimagePlot_array2image()
2368 \deprecated The class JKQTFastPlotter and all its support classes are deprecated and will be removed in future versions.
2369*/
2371/*! \brief get QIcon representing the given palette
2372 \ingroup jkqtfastplotter_tools
2373 \deprecated The class JKQTFastPlotter and all its support classes are deprecated and will be removed in future versions.
2374 \see JKQTFPimagePlot_array2image()
2375*/
2377
2378
2379/*! \brief plots a given grayscale image with a given color palette
2380 \ingroup jkqtfastplotter_PlotItems
2381 \deprecated The class JKQTFastPlotter and all its support classes are deprecated and will be removed in future versions.
2382
2383 - This plot may plot any 2D array of data (8-, 16-, 32-bit integer images, float and double).
2384 - This class also draws a color bar in the right border of the plot
2385 .
2386
2387*/
2389 Q_OBJECT
2390 protected:
2391 /** \brief image to plot */
2392 void* image;
2393 /** \brief format of the image */
2395 /** \brief width of image in pt */
2397 /** \brief height of image in pt */
2399 /** \brief minimum x value of the image */
2400 double xmin;
2401 /** \brief maximum x value of the image */
2402 double xmax;
2403 /** \brief minimum x value of the image */
2404 double ymin;
2405 /** \brief maximum x value of the image */
2406 double ymax;
2407 /** \brief defines the palette to use */
2409 /** \brief defines minimum color value */
2410 double colorMin;
2411 /** \brief defines maximum color value */
2412 double colorMax;
2413 /** \brief draw color bar */
2415 /** \brief color bar width in pt */
2417 /** \brief rotation of the image when plotting in units of 90 degrees (counter clock wise) */
2419 public:
2420
2421
2422 /*! \brief class constructor
2423
2424 */
2425 JKQTFPimagePlot(JKQTFastPlotter* parent, void* image, JKQTFPImageFormat imageFormat, int width, int height, double xmin, double xmax, double ymin, double ymax, JKQTFPColorPalette palette=JKQTFP_MATLAB) ;
2426
2427 JKQTFPimagePlot(JKQTFastPlotter* parent, void* image, JKQTFPImageFormat imageFormat, int width, int height, JKQTFPColorPalette palette=JKQTFP_MATLAB);
2428
2429 /** \brief draw the graph */
2430 virtual void drawGraph(QPainter& painter) override;
2431
2432
2433
2434 /** \copydoc image */
2435 inline void setImage(void* __value)
2436 {
2437 if (this->image != __value) {
2438 this->image = __value;
2439 replot();
2440 }
2441 }
2442 /** \copydoc image */
2443 inline void* getImage() const
2444 {
2445 return this->image;
2446 }
2447 /** \copydoc imageFormat */
2448 inline void setImageFormat(const JKQTFPImageFormat & __value)
2449 {
2450 if (this->imageFormat != __value) {
2451 this->imageFormat = __value;
2452 replot();
2453 }
2454 }
2455 /** \copydoc imageFormat */
2457 {
2458 return this->imageFormat;
2459 }
2460 /** \copydoc width */
2461 inline void setWidth(int __value)
2462 {
2463 if (this->width != __value) {
2464 this->width = __value;
2465 replot();
2466 }
2467 }
2468 /** \copydoc width */
2469 inline int getWidth() const
2470 {
2471 return this->width;
2472 }
2473 /** \copydoc height */
2474 inline void setHeight(int __value)
2475 {
2476 if (this->height != __value) {
2477 this->height = __value;
2478 replot();
2479 }
2480 }
2481 /** \copydoc height */
2482 inline int getHeight() const
2483 {
2484 return this->height;
2485 }
2486 /** \copydoc xmin */
2487 inline void setXmin(double __value)
2488 {
2489 if (this->xmin != __value) {
2490 this->xmin = __value;
2491 replot();
2492 }
2493 }
2494 /** \copydoc xmin */
2495 inline double getXmin() const
2496 {
2497 return this->xmin;
2498 }
2499 /** \copydoc xmax */
2500 inline void setXmax(double __value)
2501 {
2502 if (this->xmax != __value) {
2503 this->xmax = __value;
2504 replot();
2505 }
2506 }
2507 /** \copydoc xmax */
2508 inline double getXmax() const
2509 {
2510 return this->xmax;
2511 }
2512 /** \copydoc ymin */
2513 inline void setYmin(double __value)
2514 {
2515 if (this->ymin != __value) {
2516 this->ymin = __value;
2517 replot();
2518 }
2519 }
2520 /** \copydoc ymin */
2521 inline double getYmin() const
2522 {
2523 return this->ymin;
2524 }
2525 /** \copydoc ymax */
2526 inline void setYmax(double __value)
2527 {
2528 if (this->ymax != __value) {
2529 this->ymax = __value;
2530 replot();
2531 }
2532 }
2533 /** \copydoc ymax */
2534 inline double getYmax() const
2535 {
2536 return this->ymax;
2537 }
2538 /** \copydoc drawColorBar */
2539 inline void setDrawColorBar(bool __value)
2540 {
2541 if (this->drawColorBar != __value) {
2542 this->drawColorBar = __value;
2543 replot();
2544 }
2545 }
2546 /** \copydoc drawColorBar */
2547 inline bool getDrawColorBar() const
2548 {
2549 return this->drawColorBar;
2550 }
2551 /** \copydoc colorBarWidth */
2552 inline void setColorBarWidth(int __value)
2553 {
2554 if (this->colorBarWidth != __value) {
2555 this->colorBarWidth = __value;
2556 replot();
2557 }
2558 }
2559 /** \copydoc colorBarWidth */
2560 inline int getColorBarWidth() const
2561 {
2562 return this->colorBarWidth;
2563 }
2564 /** \copydoc rotation */
2565 inline int getRotation() const {
2566 return this->rotation;
2567 }
2568 /** \copydoc palette */
2570 return this->palette;
2571 }
2572 /** \copydoc colorMin */
2573 inline double getColorMin() const {
2574 return this->colorMin;
2575 }
2576 /** \copydoc colorMax */
2577 inline double getColorMax() const {
2578 return this->colorMax;
2579 }
2580 void setImage(void* image, JKQTFPImageFormat imageFormat, int width, int height) {
2581 this->image=image;
2582 this->imageFormat=imageFormat;
2583 this->width=width;
2584 this->height=height;
2585 replot();
2586 }
2587 public Q_SLOTS:
2588 void setRotation(int rotation) {
2589 if (this->rotation!=rotation) {
2590 this->rotation=rotation;
2591 replot();
2592 }
2593 }
2594 void setPalette(int palette) {
2595 if (this->palette!=palette) {
2596 this->palette=static_cast<JKQTFPColorPalette>(palette);
2597 replot();
2598 }
2599 }
2601 if (this->palette!=palette) {
2602 this->palette=palette;
2603 replot();
2604 }
2605 }
2606 void setColorMin(uint32_t colorMin) {
2607 if (this->colorMin!=colorMin) {
2608 this-> colorMin= colorMin;
2609 replot();
2610 }
2611 }
2612 void setColorMax(uint32_t colorMax) {
2613 if (this->colorMax!=colorMax) {
2614 this->colorMax=colorMax;
2615 replot();
2616 }
2617 }
2618 void setColorMin(int colorMin) {
2619 if (this->colorMin!=colorMin) {
2620 this-> colorMin= colorMin;
2621 replot();
2622 }
2623 }
2624 void setColorMax(int colorMax) {
2625 if (this->colorMax!=colorMax) {
2626 this->colorMax=colorMax;
2627 replot();
2628 }
2629 }
2630 void setColorMin(double colorMin) {
2631 if (this->colorMin!=colorMin) {
2632 this-> colorMin= colorMin;
2633 replot();
2634 }
2635 }
2636 void setColorMax(double colorMax) {
2637 if (this->colorMax!=colorMax) {
2638 this->colorMax=colorMax;
2639 replot();
2640 }
2641 }
2642};
2643
2644
2645
2646
2647
2648
2649/*! \brief convert a 2D image (as 1D array) into a QImage and puts the image values into one color channel (set by \a channel).
2650 \ingroup jkqtfastplotter_tools
2651 \deprecated The class JKQTFastPlotter and all its support classes are deprecated and will be removed in future versions.
2652
2653*/
2654template <class T>
2655inline void JKQTFPRGBImageOverlayPlot_array2image(T* dbl, int width, int height, QImage &img, int channel, double minColor_, double maxColor_)
2656{
2657 if (!dbl)
2658 return;
2659
2660 T minColor=static_cast<T>(minColor_);
2661 T maxColor=static_cast<T>(maxColor_);
2662
2663 #ifdef DEBUG_TIMING
2664 JKQTPHighResTimer timer;
2665 double time_sum=0;
2666 double time_gt=0;
2667 std::cout<<" timing JKQTFPimagePlot_array2image:\n";
2668 timer.start();
2669 #endif
2670 //qDebug()<<"channel = "<<channel;
2671 //qDebug()<<"color range: "<<minColor<<"..."<<maxColor;
2672 double min = *dbl;
2673 double max = *dbl;
2674 if (minColor == maxColor) {
2675 for (int i=1; i<width*height; ++i)
2676 {
2677 T v=dbl[i];
2678 if (v < min)
2679 min = v;
2680 else if (v > max)
2681 max = v;
2682 }
2683 } else {
2684 min = minColor;
2685 max = maxColor;
2686 }
2687 #ifdef DEBUG_TIMING
2688 time_gt=timer.getTime();
2689 time_sum+=time_gt;
2690 std::cout<<" finding min&max: "<<time_gt/1000.0<<" ms\n";
2691 timer.start();
2692 #endif
2693 //qDebug()<<"minColor="<<minColor<<" maxColor="<<maxColor<<" min="<<min<<" max="<<max<<"\n";
2694
2695 double delta=max-min;
2696
2697
2698 if (min != max) {
2699 // LUT found: collor the image accordingly
2700 if (channel==0) {
2701 for (int j=0; j<height; ++j) {
2702 QRgb* line=reinterpret_cast<QRgb *>(img.scanLine(height-1-j));
2703 for (int i=0; i<width; ++i) {
2704 int v = trunc(double(dbl[j*width+i]-min)*255.0/delta);
2705 v = (v < 0) ? 0 : ( (v > 255) ? 255 : v);
2706 const QRgb l=line[i];
2707 line[i]=qRgb(v,qGreen(l),qBlue(l));
2708 //if (i==j) qDebug()<<dbl[j*width+i]<<v<<hex<<l<<line[i]<<dec;
2709 }
2710 }
2711 } else if (channel==1) {
2712 for (int j=0; j<height; ++j) {
2713 QRgb* line=reinterpret_cast<QRgb *>(img.scanLine(height-1-j));
2714 for (int i=0; i<width; ++i) {
2715 int v = (dbl[j*width+i]-min)*255/delta;
2716 v = (v < 0) ? 0 : ( (v > 255) ? 255 : v);
2717 const QRgb l=line[i];
2718 line[i]=qRgb(qRed(l),v,qBlue(l));
2719 //if (i==j) qDebug()<<dbl[j*width+i]<<v<<hex<<l<<line[i]<<dec;
2720 }
2721 }
2722 } else if (channel==2) {
2723 for (int j=0; j<height; ++j) {
2724 QRgb* line=reinterpret_cast<QRgb *>(img.scanLine(height-1-j));
2725 for (int i=0; i<width; ++i) {
2726 int v = (dbl[j*width+i]-min)*255/delta;
2727 v = (v < 0) ? 0 : ( (v > 255) ? 255 : v);
2728 const QRgb l=line[i];
2729 line[i]=qRgb(qRed(l),qGreen(l),v);
2730 //if (i==j) qDebug()<<dbl[j*width+i]<<v<<hex<<l<<line[i]<<dec;
2731 }
2732 }
2733 }
2734 }
2735 #ifdef DEBUG_TIMING
2736 time_gt=timer.getTime();
2737 time_sum+=time_gt;
2738 std::cout<<" creating colored image: "<<time_gt/1000.0<<" ms\n";
2739 timer.start();
2740
2741 time_gt=timer.getTime();
2742 time_sum+=time_gt;
2743 std::cout<<" sum: "<<time_sum/1000.0<<" ms\n";
2744 timer.start();
2745 #endif
2746};
2747
2748
2749
2750
2751
2752/*! \brief plots 1,2 or 3 given grayscale images as an overlay plot, where each channel is drawn as one color channel (e.g. red, green or blue).
2753 \ingroup jkqtfastplotter_PlotItems
2754 \deprecated The class JKQTFastPlotter and all its support classes are deprecated and will be removed in future versions.
2755
2756 - This plot may plot any 2D array of data (8-, 16-, 32-bit integer images, float and double).
2757 - The images all have to have the same size
2758 .
2759
2760*/
2762 Q_OBJECT
2763 protected:
2764 /** \brief image to plot */
2766 /** \brief format of the image */
2768 /** \brief image to plot */
2770 /** \brief format of the image */
2772 /** \brief image to plot */
2774 /** \brief format of the image */
2776 /** \brief width of image in pt */
2778 /** \brief height of image in pt */
2780 /** \brief minimum x value of the image */
2781 double xmin;
2782 /** \brief maximum x value of the image */
2783 double xmax;
2784 /** \brief minimum x value of the image */
2785 double ymin;
2786 /** \brief maximum x value of the image */
2787 double ymax;
2788 /** \brief defines minimum color value */
2790 /** \brief defines maximum color value */
2792 /** \brief defines minimum color value */
2794 /** \brief defines maximum color value */
2796 /** \brief defines minimum color value */
2798 /** \brief defines maximum color value */
2800 /** \brief rotation of the image when plotting in units of 90 degrees (counter clock wise) */
2802 public:
2803 /*! \brief class constructor
2804
2805 */
2806 JKQTFPRGBImageOverlayPlot(JKQTFastPlotter* parent, void* imageRed, JKQTFPImageFormat imageFormat, int width, int height, double xmin, double xmax, double ymin, double ymax) ;
2807 JKQTFPRGBImageOverlayPlot(JKQTFastPlotter* parent, void* imageRed, JKQTFPImageFormat imageFormat, int width, int height);
2809
2810 /** \brief draw the graph */
2811 virtual void drawGraph(QPainter& painter) override;
2812
2813
2814
2815 /*! \brief sets the properties imageRed and imageFormatRed to the specified \a __value and \a __value2.
2816
2817 \see imageRed, imageFormatRed
2818 */
2819 inline void setImageRed (void* __value, JKQTFPImageFormat __value2)
2820 {
2821 bool set=false;
2822 if (this->imageRed != __value) {
2823 this->imageRed = __value;
2824 set=true;
2825 }
2826 if (this->imageFormatRed != __value2) {
2827 this->imageFormatRed = __value2;
2828 set=true;
2829 }
2830 if (set) {
2831 replot();
2832 }
2833 }
2834 /** \copydoc imageRed */
2835 inline void* getImageRed () const { return this->imageRed; }
2836 /** \copydoc imageFormatRed */
2837 inline JKQTFPImageFormat getImageFormatRed () const { return this->imageFormatRed; }
2838 /*! \brief sets the properties imageGreen and imageFormatGreen to the specified \a __value and \a __value2.
2839
2840 \see imageGreen, imageFormatGreen
2841 */
2842 inline void setImageGreen (void* __value, JKQTFPImageFormat __value2)
2843 {
2844 bool set=false;
2845 if (this->imageGreen != __value) {
2846 this->imageGreen = __value;
2847 set=true;
2848 }
2849 if (this->imageFormatGreen != __value2) {
2850 this->imageFormatGreen = __value2;
2851 set=true;
2852 }
2853 if (set) {
2854 replot();
2855 }
2856 }
2857 /** \copydoc imageGreen */
2858 inline void* getImageGreen () const { return this->imageGreen; }
2859 /** \copydoc imageFormatGreen */
2860 inline JKQTFPImageFormat getImageFormatGreen () const { return this->imageFormatGreen; }
2861 /*! \brief sets the properties imageBlue and imageFormatBlue to the specified \a __value and \a __value2.
2862
2863 \see imageBlue, imageFormatBlue
2864 */
2865 inline void setImageBlue (void* __value, JKQTFPImageFormat __value2)
2866 {
2867 bool set=false;
2868 if (this->imageBlue != __value) {
2869 this->imageBlue = __value;
2870 set=true;
2871 }
2872 if (this->imageFormatBlue != __value2) {
2873 this->imageFormatBlue = __value2;
2874 set=true;
2875 }
2876 if (set) {
2877 replot();
2878 }
2879 }
2880 /** \copydoc imageBlue */
2881 inline void* getImageBlue () const { return this->imageBlue; }
2882 /** \copydoc imageFormatBlue */
2883 inline JKQTFPImageFormat getImageFormatBlue () const { return this->imageFormatBlue; }
2884 /** \copydoc width */
2885 inline void setWidth(int __value)
2886 {
2887 if (this->width != __value) {
2888 this->width = __value;
2889 replot();
2890 }
2891 }
2892 /** \copydoc width */
2893 inline int getWidth() const
2894 {
2895 return this->width;
2896 }
2897 /** \copydoc height */
2898 inline void setHeight(int __value)
2899 {
2900 if (this->height != __value) {
2901 this->height = __value;
2902 replot();
2903 }
2904 }
2905 /** \copydoc height */
2906 inline int getHeight() const
2907 {
2908 return this->height;
2909 }
2910 /** \copydoc xmin */
2911 inline void setXmin(double __value)
2912 {
2913 if (this->xmin != __value) {
2914 this->xmin = __value;
2915 replot();
2916 }
2917 }
2918 /** \copydoc xmin */
2919 inline double getXmin() const
2920 {
2921 return this->xmin;
2922 }
2923 /** \copydoc xmax */
2924 inline void setXmax(double __value)
2925 {
2926 if (this->xmax != __value) {
2927 this->xmax = __value;
2928 replot();
2929 }
2930 }
2931 /** \copydoc xmax */
2932 inline double getXmax() const
2933 {
2934 return this->xmax;
2935 }
2936 /** \copydoc ymin */
2937 inline void setYmin(double __value)
2938 {
2939 if (this->ymin != __value) {
2940 this->ymin = __value;
2941 replot();
2942 }
2943 }
2944 /** \copydoc ymin */
2945 inline double getYmin() const
2946 {
2947 return this->ymin;
2948 }
2949 /** \copydoc ymax */
2950 inline void setYmax(double __value)
2951 {
2952 if (this->ymax != __value) {
2953 this->ymax = __value;
2954 replot();
2955 }
2956 }
2957 /** \copydoc ymax */
2958 inline double getYmax() const
2959 {
2960 return this->ymax;
2961 }
2962 /** \copydoc rotation */
2963 inline int getRotation() const {
2964 return this->rotation;
2965 }
2966 /** \copydoc colorMinRed */
2967 inline double getColorMinRed() const {
2968 return this->colorMinRed;
2969 }
2970 /** \copydoc colorMaxRed */
2971 inline double getColorMaxRed() const {
2972 return this->colorMaxRed;
2973 }
2974 /** \copydoc colorMinGreen */
2975 inline double getColorMinGreen() const {
2976 return this->colorMinGreen;
2977 }
2978 /** \copydoc colorMaxGreen */
2979 inline double getColorMaxGreen() const {
2980 return this->colorMaxGreen;
2981 }
2982 /** \copydoc colorMinBlue */
2983 inline double getColorMinBlue() const {
2984 return this->colorMinBlue;
2985 }
2986 /** \copydoc colorMaxBlue */
2987 inline double getColorMaxBlue() const {
2988 return this->colorMaxBlue;
2989 }
2990 void setImage(void* imageRed, JKQTFPImageFormat imageFormatRed, int width, int height);
2991 void setImage(void* imageRed, JKQTFPImageFormat imageFormatRed, void* imageGreen, JKQTFPImageFormat imageFormatGreen, int width, int height);
2992 void setImage(void* imageRed, JKQTFPImageFormat imageFormatRed, void* imageGreen, JKQTFPImageFormat imageFormatGreen, void* imageBlue, JKQTFPImageFormat imageFormatBlue, int width, int height);
2993 void setImage(void* imageRed, JKQTFPImageFormat imageFormatRed, int width, int height, double xmin, double xmax, double ymin, double ymax);
2994 void setImage(void* imageRed, JKQTFPImageFormat imageFormatRed, void* imageGreen, JKQTFPImageFormat imageFormatGreen, int width, int height, double xmin, double xmax, double ymin, double ymax);
2995 void setImage(void* imageRed, JKQTFPImageFormat imageFormatRed, void* imageGreen, JKQTFPImageFormat imageFormatGreen, void* imageBlue, JKQTFPImageFormat imageFormatBlue, int width, int height, double xmin, double xmax, double ymin, double ymax);
2996 public Q_SLOTS:
2997 inline void setRotation(int rotation) {
2998 if (this->rotation!=rotation) {
2999 this->rotation=rotation;
3000 replot();
3001 }
3002 }
3003 inline void setColorMinRed(uint32_t colorMin) {
3004 if (this->colorMinRed!=colorMin) {
3005 this-> colorMinRed= colorMin;
3006 replot();
3007 }
3008 }
3009 inline void setColorMaxRed(uint32_t colorMax) {
3010 if (this->colorMaxRed!=colorMax) {
3011 this->colorMaxRed=colorMax;
3012 replot();
3013 }
3014 }
3015 inline void setColorMinRed(int colorMin) {
3016 if (this->colorMinRed!=colorMin) {
3017 this-> colorMinRed= colorMin;
3018 replot();
3019 }
3020 }
3021 inline void setColorMaxRed(int colorMax) {
3022 if (this->colorMaxRed!=colorMax) {
3023 this->colorMaxRed=colorMax;
3024 replot();
3025 }
3026 }
3027 inline void setColorMinRed(double colorMin) {
3028 if (this->colorMinRed!=colorMin) {
3029 this-> colorMinRed= colorMin;
3030 replot();
3031 }
3032 }
3033 inline void setColorMaxRed(double colorMax) {
3034 if (this->colorMaxRed!=colorMax) {
3035 this->colorMaxRed=colorMax;
3036 replot();
3037 }
3038 }
3039
3040
3041 inline void setColorMinGreen(uint32_t colorMin) {
3042 if (this->colorMinGreen!=colorMin) {
3043 this-> colorMinGreen= colorMin;
3044 replot();
3045 }
3046 }
3047 inline void setColorMaxGreen(uint32_t colorMax) {
3048 if (this->colorMaxGreen!=colorMax) {
3049 this->colorMaxGreen=colorMax;
3050 replot();
3051 }
3052 }
3053 inline void setColorMinGreen(int colorMin) {
3054 if (this->colorMinGreen!=colorMin) {
3055 this-> colorMinGreen= colorMin;
3056 replot();
3057 }
3058 }
3059 inline void setColorMaxGreen(int colorMax) {
3060 if (this->colorMaxGreen!=colorMax) {
3061 this->colorMaxGreen=colorMax;
3062 replot();
3063 }
3064 }
3065 inline void setColorMinGreen(double colorMin) {
3066 if (this->colorMinGreen!=colorMin) {
3067 this-> colorMinGreen= colorMin;
3068 replot();
3069 }
3070 }
3071 inline void setColorMaxGreen(double colorMax) {
3072 if (this->colorMaxGreen!=colorMax) {
3073 this->colorMaxGreen=colorMax;
3074 replot();
3075 }
3076 }
3077
3078 inline void setColorMinBlue(uint32_t colorMin) {
3079 if (this->colorMinBlue!=colorMin) {
3080 this-> colorMinBlue= colorMin;
3081 replot();
3082 }
3083 }
3084 inline void setColorMaxBlue(uint32_t colorMax) {
3085 if (this->colorMaxBlue!=colorMax) {
3086 this->colorMaxBlue=colorMax;
3087 replot();
3088 }
3089 }
3090 inline void setColorMinBlue(int colorMin) {
3091 if (this->colorMinBlue!=colorMin) {
3092 this-> colorMinBlue= colorMin;
3093 replot();
3094 }
3095 }
3096 inline void setColorMaxBlue(int colorMax) {
3097 if (this->colorMaxBlue!=colorMax) {
3098 this->colorMaxBlue=colorMax;
3099 replot();
3100 }
3101 }
3102 inline void setColorMinBlue(double colorMin) {
3103 if (this->colorMinBlue!=colorMin) {
3104 this-> colorMinBlue= colorMin;
3105 replot();
3106 }
3107 }
3108 inline void setColorMaxBlue(double colorMax) {
3109 if (this->colorMaxBlue!=colorMax) {
3110 this->colorMaxBlue=colorMax;
3111 replot();
3112 }
3113 }
3114};
3115
3116
3117
3118/*! \brief plots an image overlay, i.e. a boolean image where each \c true pixel is drawn with a given color
3119 and the \c false pixels are transparent
3120 \ingroup jkqtfastplotter_PlotItems
3121 \deprecated The class JKQTFastPlotter and all its support classes are deprecated and will be removed in future versions.
3122
3123*/
3125 Q_OBJECT
3126 public:
3129 stRectangle
3131
3132 protected:
3133 /** \brief image to plot */
3134 bool* image;
3135 /** \brief width of image in pt */
3137 /** \brief height of image in pt */
3139 /** \brief minimum x value of the image */
3140 double xmin;
3141 /** \brief maximum x value of the image */
3142 double xmax;
3143 /** \brief minimum x value of the image */
3144 double ymin;
3145 /** \brief maximum x value of the image */
3146 double ymax;
3147 /** \brief color of the overlay pixels */
3148 QColor color;
3149 /** \brief linewidth of symbols */
3151 /** \brief rotation of the image when plotting in units of 90 degrees */
3155 public:
3156 /*! \brief class constructor
3157
3158 */
3159 JKQTFPimageOverlayPlot(JKQTFastPlotter* parent, bool* image, int width, int height, double xmin, double xmax, double ymin, double ymax, QColor color=QColor("red"));
3160
3161 JKQTFPimageOverlayPlot(JKQTFastPlotter* parent, bool* image, int width, int height, QColor color=QColor("red"));
3162
3163 /** \brief draw the graph */
3164 virtual void drawGraph(QPainter& painter) override;
3165
3166 void setData(bool* image, int width, int height) {
3167 this->image=image;
3168 this->width=width;
3169 this->height=height;
3170 replot();
3171 }
3172
3173 /** \copydoc image */
3174 inline bool* getImage() const {
3175 return this->image;
3176 }
3177 /** \copydoc rotation */
3178 inline int getRotation() const {
3179 return this->rotation;
3180 }
3181 /** \copydoc width */
3182 inline int getWidth() const {
3183 return this->width;
3184 }
3185 /** \copydoc height */
3186 inline int getHeight() const {
3187 return this->height;
3188 }
3189 /** \copydoc xmin */
3190 inline void setXmin(double __value)
3191 {
3192 if (this->xmin != __value) {
3193 this->xmin = __value;
3194 replot();
3195 }
3196 }
3197 /** \copydoc xmin */
3198 inline double getXmin() const
3199 {
3200 return this->xmin;
3201 }
3202 /** \copydoc xmax */
3203 inline void setXmax(double __value)
3204 {
3205 if (this->xmax != __value) {
3206 this->xmax = __value;
3207 replot();
3208 }
3209 }
3210 /** \copydoc xmax */
3211 inline double getXmax() const
3212 {
3213 return this->xmax;
3214 }
3215 /** \copydoc ymin */
3216 inline void setYmin(double __value)
3217 {
3218 if (this->ymin != __value) {
3219 this->ymin = __value;
3220 replot();
3221 }
3222 }
3223 /** \copydoc ymin */
3224 inline double getYmin() const
3225 {
3226 return this->ymin;
3227 }
3228 /** \copydoc ymax */
3229 inline void setYmax(double __value)
3230 {
3231 if (this->ymax != __value) {
3232 this->ymax = __value;
3233 replot();
3234 }
3235 }
3236 /** \copydoc ymax */
3237 inline double getYmax() const
3238 {
3239 return this->ymax;
3240 }
3241 /** \copydoc showAsSymbols */
3242 inline void setShowAsSymbols(bool __value)
3243 {
3244 if (this->showAsSymbols != __value) {
3245 this->showAsSymbols = __value;
3246 replot();
3247 }
3248 }
3249 /** \copydoc showAsSymbols */
3250 inline bool getShowAsSymbols() const
3251 {
3252 return this->showAsSymbols;
3253 }
3254 /** \copydoc color */
3255 inline QColor getColor() const {
3256 return this->color;
3257 }
3258 public Q_SLOTS:
3259 inline void setRotation(int rotation) {
3260 if (this->rotation!=rotation) {
3261 this->rotation=rotation;
3262 replot();
3263 }
3264 }
3265 inline void setColor(QColor color) {
3266 if (this->color!=color) {
3267 this->color=color;
3268 replot();
3269 }
3270 }
3271};
3272
3273
3274
3275/*! \brief plot a horizontal scale bar
3276 \ingroup jkqtfastplotter_PlotItems
3277 \deprecated The class JKQTFastPlotter and all its support classes are deprecated and will be removed in future versions.
3278
3279*/
3281 Q_OBJECT
3282 public:
3284 TopLeft=0,
3285 TopRight=1,
3286 BottomLeft=2,
3287 BottomRight=3
3289 protected:
3290 /** \brief width of scale bar */
3291 double width;
3292 /** \brief line width of scale bar, given in pt */
3294 /** \brief color of scale bar */
3295 QColor color;
3296 /** \brief scale bar label (use %1 to include value of width) */
3297 QString label;
3298 /** \brief font of scale bar */
3299 QFont font;
3300 /** \brief scale bar position */
3302
3303 public:
3304
3305 /*! \brief class constructor
3306
3307 */
3308 explicit JKQTFPQScaleBarXPlot(JKQTFastPlotter* parent, double width=1, const QString& label=QString("%1"), QColor color=QColor("grey"), double lineWidth=2) ;
3309
3310 /** \brief draw the graph */
3311 virtual void drawGraph(QPainter& painter) override;
3312
3313 /** \copydoc width */
3314 inline void setWidth(double __value)
3315 {
3316 if (this->width != __value) {
3317 this->width = __value;
3318 replot();
3319 }
3320 }
3321 /** \copydoc width */
3322 inline double getWidth() const
3323 {
3324 return this->width;
3325 }
3326 /** \copydoc lineWidth */
3327 inline void setLineWidth(double __value)
3328 {
3329 if (this->lineWidth != __value) {
3330 this->lineWidth = __value;
3331 replot();
3332 }
3333 }
3334 /** \copydoc lineWidth */
3335 inline double getLineWidth() const
3336 {
3337 return this->lineWidth;
3338 }
3339 /** \copydoc color */
3340 inline void setColor(const QColor & __value)
3341 {
3342 if (this->color != __value) {
3343 this->color = __value;
3344 replot();
3345 }
3346 }
3347 /** \copydoc color */
3348 inline QColor getColor() const
3349 {
3350 return this->color;
3351 }
3352 /** \copydoc label */
3353 inline void setLabel(const QString & __value)
3354 {
3355 if (this->label != __value) {
3356 this->label = __value;
3357 replot();
3358 }
3359 }
3360 /** \copydoc label */
3361 inline QString getLabel() const
3362 {
3363 return this->label;
3364 }
3365 /** \copydoc font */
3366 inline void setFont(const QFont & __value)
3367 {
3368 if (this->font != __value) {
3369 this->font = __value;
3370 replot();
3371 }
3372 }
3373 /** \copydoc font */
3374 inline QFont getFont() const
3375 {
3376 return this->font;
3377 }
3378 /** \copydoc position */
3379 inline void setPosition(const Position & __value)
3380 {
3381 if (this->position != __value) {
3382 this->position = __value;
3383 replot();
3384 }
3385 }
3386 /** \copydoc position */
3387 inline Position getPosition() const
3388 {
3389 return this->position;
3390 }
3391 public Q_SLOTS:
3392 void setPosition(int pos) {
3393 setPosition(static_cast<Position>(pos));
3394 }
3395};
3396
3397
3398
3399
3400/*! \brief plot a horizontal scale bar
3401 \ingroup jkqtfastplotter_PlotItems
3402 \deprecated The class JKQTFastPlotter and all its support classes are deprecated and will be removed in future versions.
3403
3404*/
3406 Q_OBJECT
3407
3408 protected:
3409 /** \brief distance between grid lines */
3410 double width;
3411 /** \brief line width of grid lines, given in pt */
3413 /** \brief color of the grid */
3414 QColor color;
3415 /** \brief grid line style */
3416 Qt::PenStyle style;
3417 public:
3418
3419 /*! \brief class constructor
3420
3421 */
3422 explicit JKQTFPQOverlayLinearGridPlot(JKQTFastPlotter* parent, double width=1, QColor color=QColor("grey"), double lineWidth=1, Qt::PenStyle style=Qt::DashLine) ;
3423
3424 /** \brief draw the graph */
3425 virtual void drawGraph(QPainter& painter) override;
3426
3427 /** \copydoc width */
3428 inline void setWidth(double __value)
3429 {
3430 if (this->width != __value) {
3431 this->width = __value;
3432 replot();
3433 }
3434 }
3435 /** \copydoc width */
3436 inline double getWidth() const
3437 {
3438 return this->width;
3439 }
3440 /** \copydoc lineWidth */
3441 inline void setLineWidth(double __value)
3442 {
3443 if (this->lineWidth != __value) {
3444 this->lineWidth = __value;
3445 replot();
3446 }
3447 }
3448 /** \copydoc lineWidth */
3449 inline double getLineWidth() const
3450 {
3451 return this->lineWidth;
3452 }
3453 /** \copydoc color */
3454 inline void setColor(const QColor & __value)
3455 {
3456 if (this->color != __value) {
3457 this->color = __value;
3458 replot();
3459 }
3460 }
3461 /** \copydoc color */
3462 inline QColor getColor() const
3463 {
3464 return this->color;
3465 }
3466 /** \copydoc style */
3467 inline void setStyle(Qt::PenStyle __value)
3468 {
3469 if (this->style != __value) {
3470 this->style = __value;
3471 replot();
3472 }
3473 }
3474 /** \copydoc style */
3475 inline Qt::PenStyle getStyle() const
3476 {
3477 return this->style;
3478 }
3479
3480};
3481#endif // JKQTFASTPLOTTER_H
a simple line plot for JKQTFastPlotter
Definition jkqtfastplotter.h:1049
double getWidth() const
width of the graph (in pt)
Definition jkqtfastplotter.h:1224
DataType
used to store which datatype is used for the plot data
Definition jkqtfastplotter.h:1052
@ JKQTFPLPPointer
Definition jkqtfastplotter.h:1053
void setColor(const QColor &__value)
color of the graph
Definition jkqtfastplotter.h:1190
void setStyle(Qt::PenStyle __value)
style of the graph
Definition jkqtfastplotter.h:1203
QColor getErrorLineColor() const
color of the graph
Definition jkqtfastplotter.h:1237
QVector< double > * getXv() const
pointer to x-coordinate data to display
Definition jkqtfastplotter.h:1174
DataType getDatatype() const
which type of data is used for plotting ?
Definition jkqtfastplotter.h:1186
QVector< double > * getYerrv() const
pointer to yerr-coordinate data to display
Definition jkqtfastplotter.h:1182
double * getY() const
pointer to y-coordinate data to display
Definition jkqtfastplotter.h:1166
void setErrorLineWidth(double __value)
width of the graph (in pt)
Definition jkqtfastplotter.h:1255
double * yerr
pointer to yerr-coordinate data to display
Definition jkqtfastplotter.h:1064
QVector< double > * yerrv
pointer to yerr-coordinate data to display
Definition jkqtfastplotter.h:1070
JKQTFPLinePlot(JKQTFastPlotter *parent, QVector< double > *x, QVector< double > *y, QColor color=QColor("red"), Qt::PenStyle style=Qt::SolidLine, double width=1)
class constructor
void setErrorLineStyle(Qt::PenStyle __value)
style of the graph
Definition jkqtfastplotter.h:1242
void setData(double *x, double *y, double *yerr, int N)
Definition jkqtfastplotter.h:1120
QVector< double > * getYv() const
pointer to y-coordinate data to display
Definition jkqtfastplotter.h:1178
double * x
pointer to x-coordinate data to display
Definition jkqtfastplotter.h:1060
QVector< double > * xv
pointer to x-coordinate data to display
Definition jkqtfastplotter.h:1066
void setWidth(double __value)
width of the graph (in pt)
Definition jkqtfastplotter.h:1216
int getN()
Definition jkqtfastplotter.h:1153
double errorWidth
width of the graph (in pt)
Definition jkqtfastplotter.h:1084
QColor getColor() const
color of the graph
Definition jkqtfastplotter.h:1198
QVector< double > * yv
pointer to y-coordinate data to display
Definition jkqtfastplotter.h:1068
int N
number of datapoints in the plot
Definition jkqtfastplotter.h:1058
double * getYerr() const
pointer to yerr-coordinate data to display
Definition jkqtfastplotter.h:1170
QColor errorColor
color of the graph
Definition jkqtfastplotter.h:1080
void setData(QVector< double > *x, QVector< double > *y)
Definition jkqtfastplotter.h:1129
Qt::PenStyle style
style of the graph
Definition jkqtfastplotter.h:1076
double width
width of the graph (in pt)
Definition jkqtfastplotter.h:1078
DataType datatype
which type of data is used for plotting ?
Definition jkqtfastplotter.h:1072
void setData(double *x, double *y, int N)
Definition jkqtfastplotter.h:1111
Qt::PenStyle getErrorLineStyle() const
style of the graph
Definition jkqtfastplotter.h:1250
JKQTFPLinePlot(JKQTFastPlotter *parent, int N, double *x, double *y, QColor color=QColor("red"), Qt::PenStyle style=Qt::SolidLine, double width=1)
class constructor
double * getX() const
pointer to x-coordinate data to display
Definition jkqtfastplotter.h:1162
Qt::PenStyle errorStyle
style of the graph
Definition jkqtfastplotter.h:1082
Qt::PenStyle getStyle() const
style of the graph
Definition jkqtfastplotter.h:1211
double getErrorLineWidth() const
width of the graph (in pt)
Definition jkqtfastplotter.h:1263
virtual void drawGraph(QPainter &painter) override
draw the graph
QColor color
color of the graph
Definition jkqtfastplotter.h:1074
void setData(QVector< double > *x, QVector< double > *y, QVector< double > *yerr)
Definition jkqtfastplotter.h:1141
double * y
pointer to y-coordinate data to display
Definition jkqtfastplotter.h:1062
void setErrorLineColor(const QColor &__value)
color of the graph
Definition jkqtfastplotter.h:1229
base class for all plots that may be plotted by JKQTFastPlotter
Definition jkqtfastplotter.h:1006
void paint(QPainter &painter)
draw the graph
bool isVisible() const
returns whether this graph is visible inside the plot
Definition jkqtfastplotter.h:1025
JKQTFastPlotter * parent
parent class, i.e. the plotter to plot on
Definition jkqtfastplotter.h:1010
virtual void drawGraph(QPainter &painter)=0
draw the graph
void replot()
start a replot of the parent widget
JKQTFPPlot(JKQTFastPlotter *parent)
class constructor
void setParent(JKQTFastPlotter *parent)
set the parent of the plot
Definition jkqtfastplotter.h:1022
void setVisible(bool visible)
Definition jkqtfastplotter.h:1036
bool visible
indicates whether the plot is visible or not
Definition jkqtfastplotter.h:1013
virtual ~JKQTFPPlot()
virtual class destructor
a plot of a QImage
Definition jkqtfastplotter.h:1699
void setYmax(double __value)
maximum x value of the image
Definition jkqtfastplotter.h:1776
void setImage(QImage *__value)
image to plot
Definition jkqtfastplotter.h:1724
double ymax
maximum x value of the image
Definition jkqtfastplotter.h:1711
double getYmin() const
minimum x value of the image
Definition jkqtfastplotter.h:1771
double xmax
maximum x value of the image
Definition jkqtfastplotter.h:1707
QImage * image
image to plot
Definition jkqtfastplotter.h:1703
JKQTFPQImagePlot(JKQTFastPlotter *parent, QImage *image, double xmin, double xmax, double ymin, double ymax)
class constructor
double getYmax() const
maximum x value of the image
Definition jkqtfastplotter.h:1784
QImage * getImage() const
image to plot
Definition jkqtfastplotter.h:1732
double xmin
minimum x value of the image
Definition jkqtfastplotter.h:1705
virtual void drawGraph(QPainter &painter) override
draw the graph
double getXmax() const
maximum x value of the image
Definition jkqtfastplotter.h:1758
void setXmin(double __value)
minimum x value of the image
Definition jkqtfastplotter.h:1737
void setYmin(double __value)
minimum x value of the image
Definition jkqtfastplotter.h:1763
JKQTFPQImagePlot(JKQTFastPlotter *parent, QImage *image)
void setXmax(double __value)
maximum x value of the image
Definition jkqtfastplotter.h:1750
double getXmin() const
minimum x value of the image
Definition jkqtfastplotter.h:1745
double ymin
minimum x value of the image
Definition jkqtfastplotter.h:1709
plot a horizontal scale bar
Definition jkqtfastplotter.h:3405
QColor color
color of the grid
Definition jkqtfastplotter.h:3414
double getLineWidth() const
line width of grid lines, given in pt
Definition jkqtfastplotter.h:3449
double width
distance between grid lines
Definition jkqtfastplotter.h:3410
double getWidth() const
distance between grid lines
Definition jkqtfastplotter.h:3436
void setLineWidth(double __value)
line width of grid lines, given in pt
Definition jkqtfastplotter.h:3441
void setStyle(Qt::PenStyle __value)
grid line style
Definition jkqtfastplotter.h:3467
QColor getColor() const
color of the grid
Definition jkqtfastplotter.h:3462
JKQTFPQOverlayLinearGridPlot(JKQTFastPlotter *parent, double width=1, QColor color=QColor("grey"), double lineWidth=1, Qt::PenStyle style=Qt::DashLine)
class constructor
Qt::PenStyle style
grid line style
Definition jkqtfastplotter.h:3416
Qt::PenStyle getStyle() const
grid line style
Definition jkqtfastplotter.h:3475
void setWidth(double __value)
distance between grid lines
Definition jkqtfastplotter.h:3428
void setColor(const QColor &__value)
color of the grid
Definition jkqtfastplotter.h:3454
virtual void drawGraph(QPainter &painter) override
draw the graph
double lineWidth
line width of grid lines, given in pt
Definition jkqtfastplotter.h:3412
plot a horizontal scale bar
Definition jkqtfastplotter.h:3280
double width
width of scale bar
Definition jkqtfastplotter.h:3291
QColor getColor() const
color of scale bar
Definition jkqtfastplotter.h:3348
void setPosition(int pos)
Definition jkqtfastplotter.h:3392
double getWidth() const
width of scale bar
Definition jkqtfastplotter.h:3322
void setWidth(double __value)
width of scale bar
Definition jkqtfastplotter.h:3314
Position
Definition jkqtfastplotter.h:3283
void setFont(const QFont &__value)
font of scale bar
Definition jkqtfastplotter.h:3366
double getLineWidth() const
line width of scale bar, given in pt
Definition jkqtfastplotter.h:3335
QFont font
font of scale bar
Definition jkqtfastplotter.h:3299
void setLineWidth(double __value)
line width of scale bar, given in pt
Definition jkqtfastplotter.h:3327
virtual void drawGraph(QPainter &painter) override
draw the graph
void setLabel(const QString &__value)
scale bar label (use %1 to include value of width)
Definition jkqtfastplotter.h:3353
QString label
scale bar label (use %1 to include value of width)
Definition jkqtfastplotter.h:3297
Position getPosition() const
scale bar position
Definition jkqtfastplotter.h:3387
QFont getFont() const
font of scale bar
Definition jkqtfastplotter.h:3374
double lineWidth
line width of scale bar, given in pt
Definition jkqtfastplotter.h:3293
QColor color
color of scale bar
Definition jkqtfastplotter.h:3295
void setPosition(const Position &__value)
scale bar position
Definition jkqtfastplotter.h:3379
QString getLabel() const
scale bar label (use %1 to include value of width)
Definition jkqtfastplotter.h:3361
void setColor(const QColor &__value)
color of scale bar
Definition jkqtfastplotter.h:3340
Position position
scale bar position
Definition jkqtfastplotter.h:3301
JKQTFPQScaleBarXPlot(JKQTFastPlotter *parent, double width=1, const QString &label=QString("%1"), QColor color=QColor("grey"), double lineWidth=2)
class constructor
plots 1,2 or 3 given grayscale images as an overlay plot, where each channel is drawn as one color ch...
Definition jkqtfastplotter.h:2761
void setColorMinBlue(double colorMin)
Definition jkqtfastplotter.h:3102
void setImageRed(void *__value, JKQTFPImageFormat __value2)
sets the properties imageRed and imageFormatRed to the specified __value and __value2.
Definition jkqtfastplotter.h:2819
void setColorMinRed(int colorMin)
Definition jkqtfastplotter.h:3015
void * imageRed
image to plot
Definition jkqtfastplotter.h:2765
JKQTFPImageFormat getImageFormatBlue() const
format of the image
Definition jkqtfastplotter.h:2883
void setYmax(double __value)
maximum x value of the image
Definition jkqtfastplotter.h:2950
void setColorMaxRed(int colorMax)
Definition jkqtfastplotter.h:3021
void * getImageGreen() const
image to plot
Definition jkqtfastplotter.h:2858
void setColorMinBlue(int colorMin)
Definition jkqtfastplotter.h:3090
void setColorMaxBlue(uint32_t colorMax)
Definition jkqtfastplotter.h:3084
void setImageGreen(void *__value, JKQTFPImageFormat __value2)
sets the properties imageGreen and imageFormatGreen to the specified __value and __value2.
Definition jkqtfastplotter.h:2842
double colorMinBlue
defines minimum color value
Definition jkqtfastplotter.h:2797
JKQTFPImageFormat imageFormatBlue
format of the image
Definition jkqtfastplotter.h:2775
void setHeight(int __value)
height of image in pt
Definition jkqtfastplotter.h:2898
void setImageBlue(void *__value, JKQTFPImageFormat __value2)
sets the properties imageBlue and imageFormatBlue to the specified __value and __value2.
Definition jkqtfastplotter.h:2865
void setXmin(double __value)
minimum x value of the image
Definition jkqtfastplotter.h:2911
void setColorMaxRed(uint32_t colorMax)
Definition jkqtfastplotter.h:3009
double colorMinGreen
defines minimum color value
Definition jkqtfastplotter.h:2793
void setImage(void *imageRed, JKQTFPImageFormat imageFormatRed, void *imageGreen, JKQTFPImageFormat imageFormatGreen, void *imageBlue, JKQTFPImageFormat imageFormatBlue, int width, int height, double xmin, double xmax, double ymin, double ymax)
void * getImageBlue() const
image to plot
Definition jkqtfastplotter.h:2881
void setImage(void *imageRed, JKQTFPImageFormat imageFormatRed, void *imageGreen, JKQTFPImageFormat imageFormatGreen, void *imageBlue, JKQTFPImageFormat imageFormatBlue, int width, int height)
void setWidth(int __value)
width of image in pt
Definition jkqtfastplotter.h:2885
virtual void drawGraph(QPainter &painter) override
draw the graph
double getColorMaxGreen() const
defines maximum color value
Definition jkqtfastplotter.h:2979
double getYmax() const
maximum x value of the image
Definition jkqtfastplotter.h:2958
double getYmin() const
minimum x value of the image
Definition jkqtfastplotter.h:2945
double getColorMaxRed() const
defines maximum color value
Definition jkqtfastplotter.h:2971
void setImage(void *imageRed, JKQTFPImageFormat imageFormatRed, int width, int height)
JKQTFPImageFormat getImageFormatGreen() const
format of the image
Definition jkqtfastplotter.h:2860
void setColorMinRed(double colorMin)
Definition jkqtfastplotter.h:3027
double colorMaxRed
defines maximum color value
Definition jkqtfastplotter.h:2791
void setColorMinRed(uint32_t colorMin)
Definition jkqtfastplotter.h:3003
void setImage(void *imageRed, JKQTFPImageFormat imageFormatRed, void *imageGreen, JKQTFPImageFormat imageFormatGreen, int width, int height, double xmin, double xmax, double ymin, double ymax)
void setColorMinGreen(double colorMin)
Definition jkqtfastplotter.h:3065
void setImage(void *imageRed, JKQTFPImageFormat imageFormatRed, int width, int height, double xmin, double xmax, double ymin, double ymax)
int height
height of image in pt
Definition jkqtfastplotter.h:2779
JKQTFPRGBImageOverlayPlot(JKQTFastPlotter *parent, void *imageRed, JKQTFPImageFormat imageFormat, int width, int height, double xmin, double xmax, double ymin, double ymax)
class constructor
JKQTFPRGBImageOverlayPlot(JKQTFastPlotter *parent, void *imageRed, JKQTFPImageFormat imageFormat, int width, int height)
void setXmax(double __value)
maximum x value of the image
Definition jkqtfastplotter.h:2924
int getWidth() const
width of image in pt
Definition jkqtfastplotter.h:2893
JKQTFPImageFormat getImageFormatRed() const
format of the image
Definition jkqtfastplotter.h:2837
double xmin
minimum x value of the image
Definition jkqtfastplotter.h:2781
void setColorMaxBlue(double colorMax)
Definition jkqtfastplotter.h:3108
double colorMinRed
defines minimum color value
Definition jkqtfastplotter.h:2789
JKQTFPImageFormat imageFormatGreen
format of the image
Definition jkqtfastplotter.h:2771
double getXmin() const
minimum x value of the image
Definition jkqtfastplotter.h:2919
double getColorMinRed() const
defines minimum color value
Definition jkqtfastplotter.h:2967
int getHeight() const
height of image in pt
Definition jkqtfastplotter.h:2906
double getColorMinGreen() const
defines minimum color value
Definition jkqtfastplotter.h:2975
int width
width of image in pt
Definition jkqtfastplotter.h:2777
void setColorMinGreen(int colorMin)
Definition jkqtfastplotter.h:3053
double getColorMinBlue() const
defines minimum color value
Definition jkqtfastplotter.h:2983
void setColorMaxRed(double colorMax)
Definition jkqtfastplotter.h:3033
int rotation
rotation of the image when plotting in units of 90 degrees (counter clock wise)
Definition jkqtfastplotter.h:2801
double getXmax() const
maximum x value of the image
Definition jkqtfastplotter.h:2932
JKQTFPRGBImageOverlayPlot(JKQTFastPlotter *parent)
void setColorMinGreen(uint32_t colorMin)
Definition jkqtfastplotter.h:3041
double ymax
maximum x value of the image
Definition jkqtfastplotter.h:2787
void setColorMinBlue(uint32_t colorMin)
Definition jkqtfastplotter.h:3078
void setImage(void *imageRed, JKQTFPImageFormat imageFormatRed, void *imageGreen, JKQTFPImageFormat imageFormatGreen, int width, int height)
double getColorMaxBlue() const
defines maximum color value
Definition jkqtfastplotter.h:2987
double xmax
maximum x value of the image
Definition jkqtfastplotter.h:2783
void * getImageRed() const
image to plot
Definition jkqtfastplotter.h:2835
double colorMaxBlue
defines maximum color value
Definition jkqtfastplotter.h:2799
double ymin
minimum x value of the image
Definition jkqtfastplotter.h:2785
void * imageGreen
image to plot
Definition jkqtfastplotter.h:2769
void * imageBlue
image to plot
Definition jkqtfastplotter.h:2773
double colorMaxGreen
defines maximum color value
Definition jkqtfastplotter.h:2795
JKQTFPImageFormat imageFormatRed
format of the image
Definition jkqtfastplotter.h:2767
void setYmin(double __value)
minimum x value of the image
Definition jkqtfastplotter.h:2937
void setRotation(int rotation)
Definition jkqtfastplotter.h:2997
void setColorMaxGreen(double colorMax)
Definition jkqtfastplotter.h:3071
void setColorMaxGreen(int colorMax)
Definition jkqtfastplotter.h:3059
void setColorMaxGreen(uint32_t colorMax)
Definition jkqtfastplotter.h:3047
int getRotation() const
rotation of the image when plotting in units of 90 degrees (counter clock wise)
Definition jkqtfastplotter.h:2963
void setColorMaxBlue(int colorMax)
Definition jkqtfastplotter.h:3096
a simple vertical bar plot for JKQTFastPlotter
Definition jkqtfastplotter.h:1334
JKQTFPVBarPlot(JKQTFastPlotter *parent, int N, double *x, double *y, QColor color=QColor("red"), Qt::PenStyle style=Qt::SolidLine, double width=1)
class constructor
JKQTFPVBarPlot(JKQTFastPlotter *parent, QVector< double > *x, QVector< double > *y, QColor color=QColor("red"), Qt::PenStyle style=Qt::SolidLine, double width=1)
class constructor
virtual void drawGraph(QPainter &painter) override
draw the graph
a simple plot that draws a cross for every datapoint
Definition jkqtfastplotter.h:1278
virtual void drawGraph(QPainter &painter) override
draw the graph
double getCrossWidth() const
width of the crosses
Definition jkqtfastplotter.h:1316
JKQTFPVCrossPlot(JKQTFastPlotter *parent, QVector< double > *x, QVector< double > *y, QColor color=QColor("red"), Qt::PenStyle style=Qt::SolidLine, double width=1)
class constructor
JKQTFPVCrossPlot(JKQTFastPlotter *parent, int N, double *x, double *y, QColor color=QColor("red"), Qt::PenStyle style=Qt::SolidLine, double width=1)
class constructor
double crossWidth
width of the crosses
Definition jkqtfastplotter.h:1322
void setCrossWidth(double __value)
width of the crosses
Definition jkqtfastplotter.h:1308
plot a range of x values
Definition jkqtfastplotter.h:1370
void setXmax(int xmax)
Definition jkqtfastplotter.h:1520
double xmax
end of x range
Definition jkqtfastplotter.h:1376
QColor getColor() const
color of the graph
Definition jkqtfastplotter.h:1414
double getXmin() const
start of x range
Definition jkqtfastplotter.h:1471
void setColor(const QColor &__value)
color of the graph
Definition jkqtfastplotter.h:1406
double getWidth() const
width of the graph (in pt)
Definition jkqtfastplotter.h:1466
void setStyle(Qt::PenStyle __value)
style of the graph
Definition jkqtfastplotter.h:1445
void setShowCenterline(bool __value)
Definition jkqtfastplotter.h:1483
JKQTFPXRangePlot(JKQTFastPlotter *parent, double xmin, double xmax, QColor color=QColor("red"), Qt::PenStyle style=Qt::SolidLine, double width=1, Qt::BrushStyle fillStyle=Qt::NoBrush)
class constructor
void setFillStyle(Qt::BrushStyle __value)
fill style of the graph
Definition jkqtfastplotter.h:1432
void setCenterline(int centerline)
Definition jkqtfastplotter.h:1496
double width
width of the graph (in pt)
Definition jkqtfastplotter.h:1384
double xmin
start of x range
Definition jkqtfastplotter.h:1374
Qt::PenStyle style
style of the graph
Definition jkqtfastplotter.h:1382
void setWidth(double __value)
width of the graph (in pt)
Definition jkqtfastplotter.h:1458
double getXmax() const
end of x range
Definition jkqtfastplotter.h:1475
Qt::PenStyle getStyle() const
style of the graph
Definition jkqtfastplotter.h:1453
virtual void drawGraph(QPainter &painter) override
draw the graph
QColor getFillColor() const
fill color of the graph
Definition jkqtfastplotter.h:1427
bool showCenterline
Definition jkqtfastplotter.h:1378
bool getShowCenterline() const
Definition jkqtfastplotter.h:1491
Qt::BrushStyle fillStyle
fill style of the graph
Definition jkqtfastplotter.h:1388
void setXmin(int xmin)
Definition jkqtfastplotter.h:1514
Qt::BrushStyle getFillStyle() const
fill style of the graph
Definition jkqtfastplotter.h:1440
QColor color
color of the graph
Definition jkqtfastplotter.h:1380
double centerline
Definition jkqtfastplotter.h:1377
double getCenterline() const
Definition jkqtfastplotter.h:1479
void setFillColor(const QColor &__value)
fill color of the graph
Definition jkqtfastplotter.h:1419
void setXmax(double xmax)
Definition jkqtfastplotter.h:1508
void setXmin(double xmin)
Definition jkqtfastplotter.h:1502
QColor fillColor
fill color of the graph
Definition jkqtfastplotter.h:1386
plot a range of x values
Definition jkqtfastplotter.h:1535
QColor getColor() const
color of the graph
Definition jkqtfastplotter.h:1579
Qt::BrushStyle getFillStyle() const
fill style of the graph
Definition jkqtfastplotter.h:1605
void setFillStyle(Qt::BrushStyle __value)
fill style of the graph
Definition jkqtfastplotter.h:1597
void setColor(const QColor &__value)
color of the graph
Definition jkqtfastplotter.h:1571
void setYmax(double xmax)
Definition jkqtfastplotter.h:1673
JKQTFPYRangePlot(JKQTFastPlotter *parent, double ymin, double ymax, QColor color=QColor("red"), Qt::PenStyle style=Qt::SolidLine, double width=1, Qt::BrushStyle fillStyle=Qt::NoBrush)
class constructor
bool showCenterline
Definition jkqtfastplotter.h:1543
QColor fillColor
fill color of the graph
Definition jkqtfastplotter.h:1551
Qt::PenStyle style
style of the graph
Definition jkqtfastplotter.h:1547
Qt::BrushStyle fillStyle
fill style of the graph
Definition jkqtfastplotter.h:1553
void setCenterline(int centerline)
Definition jkqtfastplotter.h:1661
QColor getFillColor() const
fill color of the graph
Definition jkqtfastplotter.h:1592
virtual void drawGraph(QPainter &painter) override
draw the graph
double getYmax() const
end of x range
Definition jkqtfastplotter.h:1640
double getYmin() const
start of x range
Definition jkqtfastplotter.h:1636
void setFillColor(const QColor &__value)
fill color of the graph
Definition jkqtfastplotter.h:1584
void setYmax(int xmax)
Definition jkqtfastplotter.h:1685
double getWidth() const
width of the graph (in pt)
Definition jkqtfastplotter.h:1631
QColor color
color of the graph
Definition jkqtfastplotter.h:1545
double ymin
start of x range
Definition jkqtfastplotter.h:1539
double ymax
end of x range
Definition jkqtfastplotter.h:1541
void setShowCenterline(bool __value)
Definition jkqtfastplotter.h:1648
void setYmin(double xmin)
Definition jkqtfastplotter.h:1667
double centerline
Definition jkqtfastplotter.h:1542
Qt::PenStyle getStyle() const
style of the graph
Definition jkqtfastplotter.h:1618
void setStyle(Qt::PenStyle __value)
style of the graph
Definition jkqtfastplotter.h:1610
void setWidth(double __value)
width of the graph (in pt)
Definition jkqtfastplotter.h:1623
double width
width of the graph (in pt)
Definition jkqtfastplotter.h:1549
void setYmin(int xmin)
Definition jkqtfastplotter.h:1679
bool getShowCenterline() const
Definition jkqtfastplotter.h:1656
double getCenterline() const
Definition jkqtfastplotter.h:1644
plots an image overlay, i.e. a boolean image where each true pixel is drawn with a given color and th...
Definition jkqtfastplotter.h:3124
void setData(bool *image, int width, int height)
Definition jkqtfastplotter.h:3166
QColor color
color of the overlay pixels
Definition jkqtfastplotter.h:3148
void setRotation(int rotation)
Definition jkqtfastplotter.h:3259
void setShowAsSymbols(bool __value)
Definition jkqtfastplotter.h:3242
bool getShowAsSymbols() const
Definition jkqtfastplotter.h:3250
SymbolType
Definition jkqtfastplotter.h:3127
@ stCircle
Definition jkqtfastplotter.h:3128
double getXmin() const
minimum x value of the image
Definition jkqtfastplotter.h:3198
void setYmax(double __value)
maximum x value of the image
Definition jkqtfastplotter.h:3229
JKQTFPimageOverlayPlot(JKQTFastPlotter *parent, bool *image, int width, int height, double xmin, double xmax, double ymin, double ymax, QColor color=QColor("red"))
class constructor
double ymax
maximum x value of the image
Definition jkqtfastplotter.h:3146
double getYmin() const
minimum x value of the image
Definition jkqtfastplotter.h:3224
int getHeight() const
height of image in pt
Definition jkqtfastplotter.h:3186
double ymin
minimum x value of the image
Definition jkqtfastplotter.h:3144
SymbolType symboltype
Definition jkqtfastplotter.h:3153
bool showAsSymbols
Definition jkqtfastplotter.h:3154
bool * image
image to plot
Definition jkqtfastplotter.h:3134
int getRotation() const
rotation of the image when plotting in units of 90 degrees
Definition jkqtfastplotter.h:3178
QColor getColor() const
color of the overlay pixels
Definition jkqtfastplotter.h:3255
double xmax
maximum x value of the image
Definition jkqtfastplotter.h:3142
void setColor(QColor color)
Definition jkqtfastplotter.h:3265
int getWidth() const
width of image in pt
Definition jkqtfastplotter.h:3182
bool * getImage() const
image to plot
Definition jkqtfastplotter.h:3174
void setYmin(double __value)
minimum x value of the image
Definition jkqtfastplotter.h:3216
double linewidth
linewidth of symbols
Definition jkqtfastplotter.h:3150
double xmin
minimum x value of the image
Definition jkqtfastplotter.h:3140
double getYmax() const
maximum x value of the image
Definition jkqtfastplotter.h:3237
JKQTFPimageOverlayPlot(JKQTFastPlotter *parent, bool *image, int width, int height, QColor color=QColor("red"))
double getXmax() const
maximum x value of the image
Definition jkqtfastplotter.h:3211
int rotation
rotation of the image when plotting in units of 90 degrees
Definition jkqtfastplotter.h:3152
int width
width of image in pt
Definition jkqtfastplotter.h:3136
int height
height of image in pt
Definition jkqtfastplotter.h:3138
void setXmax(double __value)
maximum x value of the image
Definition jkqtfastplotter.h:3203
void setXmin(double __value)
minimum x value of the image
Definition jkqtfastplotter.h:3190
virtual void drawGraph(QPainter &painter) override
draw the graph
plots a given grayscale image with a given color palette
Definition jkqtfastplotter.h:2388
int width
width of image in pt
Definition jkqtfastplotter.h:2396
void setYmax(double __value)
maximum x value of the image
Definition jkqtfastplotter.h:2526
int getRotation() const
rotation of the image when plotting in units of 90 degrees (counter clock wise)
Definition jkqtfastplotter.h:2565
double getYmax() const
maximum x value of the image
Definition jkqtfastplotter.h:2534
double getColorMax() const
defines maximum color value
Definition jkqtfastplotter.h:2577
int height
height of image in pt
Definition jkqtfastplotter.h:2398
double xmax
maximum x value of the image
Definition jkqtfastplotter.h:2402
void setColorMin(uint32_t colorMin)
Definition jkqtfastplotter.h:2606
virtual void drawGraph(QPainter &painter) override
draw the graph
void setPalette(int palette)
Definition jkqtfastplotter.h:2594
void * image
image to plot
Definition jkqtfastplotter.h:2392
int getWidth() const
width of image in pt
Definition jkqtfastplotter.h:2469
double colorMin
defines minimum color value
Definition jkqtfastplotter.h:2410
int getHeight() const
height of image in pt
Definition jkqtfastplotter.h:2482
void setImage(void *image, JKQTFPImageFormat imageFormat, int width, int height)
Definition jkqtfastplotter.h:2580
JKQTFPColorPalette getPalette() const
defines the palette to use
Definition jkqtfastplotter.h:2569
void setPalette(JKQTFPColorPalette palette)
Definition jkqtfastplotter.h:2600
void * getImage() const
image to plot
Definition jkqtfastplotter.h:2443
double xmin
minimum x value of the image
Definition jkqtfastplotter.h:2400
void setHeight(int __value)
height of image in pt
Definition jkqtfastplotter.h:2474
void setColorMax(int colorMax)
Definition jkqtfastplotter.h:2624
JKQTFPimagePlot(JKQTFastPlotter *parent, void *image, JKQTFPImageFormat imageFormat, int width, int height, JKQTFPColorPalette palette=JKQTFP_MATLAB)
void setColorMin(double colorMin)
Definition jkqtfastplotter.h:2630
int getColorBarWidth() const
color bar width in pt
Definition jkqtfastplotter.h:2560
void setColorBarWidth(int __value)
color bar width in pt
Definition jkqtfastplotter.h:2552
double colorMax
defines maximum color value
Definition jkqtfastplotter.h:2412
double getXmax() const
maximum x value of the image
Definition jkqtfastplotter.h:2508
double getYmin() const
minimum x value of the image
Definition jkqtfastplotter.h:2521
void setColorMin(int colorMin)
Definition jkqtfastplotter.h:2618
void setImageFormat(const JKQTFPImageFormat &__value)
format of the image
Definition jkqtfastplotter.h:2448
double getColorMin() const
defines minimum color value
Definition jkqtfastplotter.h:2573
void setXmin(double __value)
minimum x value of the image
Definition jkqtfastplotter.h:2487
int rotation
rotation of the image when plotting in units of 90 degrees (counter clock wise)
Definition jkqtfastplotter.h:2418
void setColorMax(double colorMax)
Definition jkqtfastplotter.h:2636
void setYmin(double __value)
minimum x value of the image
Definition jkqtfastplotter.h:2513
double ymin
minimum x value of the image
Definition jkqtfastplotter.h:2404
void setDrawColorBar(bool __value)
draw color bar
Definition jkqtfastplotter.h:2539
JKQTFPimagePlot(JKQTFastPlotter *parent, void *image, JKQTFPImageFormat imageFormat, int width, int height, double xmin, double xmax, double ymin, double ymax, JKQTFPColorPalette palette=JKQTFP_MATLAB)
class constructor
JKQTFPColorPalette palette
defines the palette to use
Definition jkqtfastplotter.h:2408
JKQTFPImageFormat getImageFormat() const
format of the image
Definition jkqtfastplotter.h:2456
void setWidth(int __value)
width of image in pt
Definition jkqtfastplotter.h:2461
JKQTFPImageFormat imageFormat
format of the image
Definition jkqtfastplotter.h:2394
void setColorMax(uint32_t colorMax)
Definition jkqtfastplotter.h:2612
bool drawColorBar
draw color bar
Definition jkqtfastplotter.h:2414
int colorBarWidth
color bar width in pt
Definition jkqtfastplotter.h:2416
void setRotation(int rotation)
Definition jkqtfastplotter.h:2588
void setImage(void *__value)
image to plot
Definition jkqtfastplotter.h:2435
bool getDrawColorBar() const
draw color bar
Definition jkqtfastplotter.h:2547
double ymax
maximum x value of the image
Definition jkqtfastplotter.h:2406
void setXmax(double __value)
maximum x value of the image
Definition jkqtfastplotter.h:2500
double getXmin() const
minimum x value of the image
Definition jkqtfastplotter.h:2495
a speed optimized plotter class
Definition jkqtfastplotter.h:106
QString default_tickFontName
default value for property tickFontName.
Definition jkqtfastplotter.h:263
int default_plotBorderLeft
default value for property plotBorderLeft.
Definition jkqtfastplotter.h:143
double xScale
x axis scaling factor (calculated internally)
Definition jkqtfastplotter.h:288
QImage oldImage
this can be used when drawing a zoom rectangle to store an unchanged copy of the currently displayed ...
Definition jkqtfastplotter.h:129
void setDragShapePen(const QPen &__value)
Definition jkqtfastplotter.h:456
void setPlotBorderLeft(int __value)
free space between widget left border and plot left border
Definition jkqtfastplotter.h:483
double yOffset
y axis offset (calculated internally)
Definition jkqtfastplotter.h:296
double gridWidth
width of the coordinate grid (in pixel)
Definition jkqtfastplotter.h:240
void setLabelFontName(const QString &__value)
font name of the axis labels
Definition jkqtfastplotter.h:685
double getXMax() const
maximum value of x axis
Definition jkqtfastplotter.h:573
QColor default_plotBackgroundColor
default value for property plotBackgroundColor.
Definition jkqtfastplotter.h:212
Qt::PenStyle default_gridStyle
default value for property gridStyle.
Definition jkqtfastplotter.h:238
int getInternalPlotBorderTop() const
internally calculated: free space between widget top border and plot bottom border
Definition jkqtfastplotter.h:565
bool drawZeroAxes
indicates whether to draw axes at x=0/y=0
Definition jkqtfastplotter.h:219
virtual void paintEvent(QPaintEvent *event) override
this simply paints the stored image to the widget's surface
void clicked(double x, double y)
emitted whenever the mouse is clicked inside the plot
void mouseMoved(double x, double y)
emitted whenever the mouse is clicked inside the plot
bool getXAxisLog() const
is x axis logarithmic?
Definition jkqtfastplotter.h:585
double aspectRatio
aspect ratio of the plot, only used when maintainAspectRation is true
Definition jkqtfastplotter.h:329
void setXMax(double value)
set xMax
int getInternalPlotBorderBottom() const
internally calculated: free space between widget bottom border and plot bottom border
Definition jkqtfastplotter.h:557
QColor getBackgroundColor() const
color of the background
Definition jkqtfastplotter.h:602
double getTickLength() const
length of an axis tick (pixels)
Definition jkqtfastplotter.h:732
QString xAxisLabel
label of x axis
Definition jkqtfastplotter.h:306
void doubleClicked(double x, double y, Qt::KeyboardModifiers modifiers)
emitted whenever the mouse is double-clicked inside the plot
double getTickFontSize() const
font size (in points) of the tick labels
Definition jkqtfastplotter.h:706
bool dragLine
Definition jkqtfastplotter.h:338
int plotBorderBottom
free space between widget bottom border and plot bottom border
Definition jkqtfastplotter.h:145
void updateDataImmediate()
replot only the data, forces a redraw by calling QWidget::repaint()
void draw(QPainter *painter, QSize *size=nullptr)
draw the contents onto any QPainter, starting at (0,0), returns the size of the whole plot in size,...
Qt::PenStyle getGridStyle() const
style of the coordinate grid
Definition jkqtfastplotter.h:654
void clearPlots(bool remove=false)
clear all plots in the graph
void addPlot(JKQTFPPlot *g)
add a new graph
double getYMax() const
maximum value of y axis
Definition jkqtfastplotter.h:581
double default_tickFontSize
default value for property tickFontSize.
Definition jkqtfastplotter.h:258
void calcPlotScaling()
recalculate the scaling of the plot
void updateData()
replot only the data
void setXYRange(double xmin, double xmax, double ymin, double ymax, bool xlogarithmic=false, bool ylogarithmic=false)
set the properties of both axes
JKQTFastPlotter * synchronizeX
synchronize x-axis settings to this plotter
Definition jkqtfastplotter.h:316
void setAspectRatio(double __value)
aspect ratio of the plot, only used when maintainAspectRation is true
Definition jkqtfastplotter.h:867
QColor default_gridColor
default value for property gridColor.
Definition jkqtfastplotter.h:233
bool getDrawGrid() const
indicates whether to draw a grid
Definition jkqtfastplotter.h:628
double getXMin() const
minimum value of x axis
Definition jkqtfastplotter.h:569
bool doesMaintainAspectRatio() const
indicates whether to maintain a specific aspect ratio
Definition jkqtfastplotter.h:888
QSize minimumSizeHint() const override
QColor plotBackgroundColor
color of the plot's background
Definition jkqtfastplotter.h:209
void mouseDragged(double x_start, double y_start, double x_end, double y_end, Qt::KeyboardModifiers modifiers)
emitted when the mouse has been dragged with the left button clicked
void setSystemWidth(double __value)
width of the coordinate (in pixel)
Definition jkqtfastplotter.h:776
double getXZeroTick() const
a label position from which axis label plotting is started for the x axis
Definition jkqtfastplotter.h:797
double yTickDistance
distance between two labels on y axis
Definition jkqtfastplotter.h:304
void setYZeroTick(double __value)
a label position from which axis label plotting is started for the y axis
Definition jkqtfastplotter.h:802
void setDrawZeroAxes(bool __value)
indicates whether to draw axes at x=0/y=0
Definition jkqtfastplotter.h:750
QColor backgroundColor
color of the background
Definition jkqtfastplotter.h:201
double getYZeroTick() const
a label position from which axis label plotting is started for the y axis
Definition jkqtfastplotter.h:810
double getAspectRatio() const
aspect ratio of the plot, only used when maintainAspectRation is true
Definition jkqtfastplotter.h:875
void setPlotBorderTop(int __value)
free space between widget top border and plot bottom border
Definition jkqtfastplotter.h:522
bool doDrawing
if false the plotting won't be performed (may be used to set more than one parameter without replot
Definition jkqtfastplotter.h:132
double yZeroTick
a label position from which axis label plotting is started for the y axis
Definition jkqtfastplotter.h:300
double default_systemWidth
default value for property systemWidth.
Definition jkqtfastplotter.h:199
double xZeroTick
a label position from which axis label plotting is started for the x axis
Definition jkqtfastplotter.h:298
QMutex mutexRepaint
mutex to lock global widget repaint
Definition jkqtfastplotter.h:373
void setDrawGrid(bool __value)
indicates whether to draw a grid
Definition jkqtfastplotter.h:620
bool dragging
Definition jkqtfastplotter.h:335
double getYMin() const
minimum value of y axis
Definition jkqtfastplotter.h:577
bool default_drawZeroAxes
default value for property drawZeroAxes.
Definition jkqtfastplotter.h:222
QVector< JKQTFPPlot * > plots
list of plots in this graph
Definition jkqtfastplotter.h:135
bool doFullRepaint
indicates whether to do full repaint (system and data) at the next repaint (any of the repaint meotho...
Definition jkqtfastplotter.h:120
void setSynchronizeY(JKQTFastPlotter *__value)
synchronize y-axis settings to this plotter
Definition jkqtfastplotter.h:932
int getPlotBorderBottom() const
free space between widget bottom border and plot bottom border
Definition jkqtfastplotter.h:504
void setTickFontSize(double __value)
font size (in points) of the tick labels
Definition jkqtfastplotter.h:698
int getPlotBorderLeft() const
free space between widget left border and plot left border
Definition jkqtfastplotter.h:491
bool getDrawSystemBox() const
indicates whether to draw a system box
Definition jkqtfastplotter.h:745
double yMax
maximum value of y axis
Definition jkqtfastplotter.h:279
QColor default_backgroundColor
default value for property backgroundColor.
Definition jkqtfastplotter.h:204
double getYTickDistance() const
distance between two labels on y axis
Definition jkqtfastplotter.h:836
void setSystemColor(const QColor &__value)
color of the coordinate system
Definition jkqtfastplotter.h:763
double xMax
maximum value of x axis
Definition jkqtfastplotter.h:275
QString tickFontName
font name of the tick labels
Definition jkqtfastplotter.h:260
bool getYAxisLabelVisible() const
plot y axis label
Definition jkqtfastplotter.h:914
void setGridStyle(Qt::PenStyle __value)
style of the coordinate grid
Definition jkqtfastplotter.h:646
double p2y(long y)
return y coordinate from y-pixel
Definition jkqtfastplotter.h:447
bool default_drawGrid
default value for property drawGrid.
Definition jkqtfastplotter.h:228
bool yAxisLabelVisible
plot y axis label
Definition jkqtfastplotter.h:311
int plotBorderLeft
free space between widget left border and plot left border
Definition jkqtfastplotter.h:140
int getPlotBorderTop() const
free space between widget top border and plot bottom border
Definition jkqtfastplotter.h:530
QString getLabelFontName() const
font name of the axis labels
Definition jkqtfastplotter.h:693
QMutex mutexRepaintData
mutex to lock data repaint
Definition jkqtfastplotter.h:376
void mouseDragFinished(double x_start, double y_start, double x_end, double y_end, Qt::KeyboardModifiers modifiers)
emitted after the mouse has been dragged with the left button clicked
QString getXAxisLabel() const
label of x axis
Definition jkqtfastplotter.h:849
void setGridWidth(double __value)
width of the coordinate grid (in pixel)
Definition jkqtfastplotter.h:659
void doubleClicked(double x, double y)
emitted whenever the mouse is double-clicked inside the plot
int plotWidth
plot width in pt inside the widget (calculated by calcPlotScaling() from plotBorderLeft,...
Definition jkqtfastplotter.h:186
virtual void mouseDoubleClickEvent(QMouseEvent *event) override
event handler for a double click
void setPlotBorderRight(int __value)
free space between widget right border and plot left border
Definition jkqtfastplotter.h:509
double x2p(double x)
return x-pixel coordinate from x coordinate
Definition jkqtfastplotter.h:418
void setXMin(double value)
set xMin
JKQTFastPlotter * synchronizeY
synchronize y-axis settings to this plotter
Definition jkqtfastplotter.h:318
Qt::PenStyle gridStyle
style of the coordinate grid
Definition jkqtfastplotter.h:235
bool getDrawZeroAxes() const
indicates whether to draw axes at x=0/y=0
Definition jkqtfastplotter.h:758
bool xAxisLabelVisible
plot x axis label
Definition jkqtfastplotter.h:313
void setDrawSystemBox(bool __value)
indicates whether to draw a system box
Definition jkqtfastplotter.h:737
virtual void mouseReleaseEvent(QMouseEvent *event) override
event handler for a mouse button is released
void setTickLength(double __value)
length of an axis tick (pixels)
Definition jkqtfastplotter.h:724
virtual void resizeEvent(QResizeEvent *event) override
resizes the internal representation (image) of the graphs
bool isPlotUpdateEnabled() const
if false the plotting won't be performed (may be used to set more than one parameter without replot
Definition jkqtfastplotter.h:548
double default_gridWidth
default value for property gridWidth.
Definition jkqtfastplotter.h:243
void setXAxisLabelVisible(bool __value)
plot x axis label
Definition jkqtfastplotter.h:893
void setXRange(double min, double max, bool logarithmic=false)
set the properties of the x axis
QString getTickFontName() const
font name of the tick labels
Definition jkqtfastplotter.h:719
void redrawPlotImmediate()
replot everything (slowest possible plotting) and forces a repaint calling QWidget::repaint()
double tickFontSize
font size (in points) of the tick labels
Definition jkqtfastplotter.h:255
void setYRange(double min, double max, bool logarithmic=false)
set the properties of the y axis
double getSystemWidth() const
width of the coordinate (in pixel)
Definition jkqtfastplotter.h:784
double p2x(long x)
return x coordinate from x-pixel
Definition jkqtfastplotter.h:428
double xMin
minimum value of x axis
Definition jkqtfastplotter.h:273
int getPlotHeight() const
plot height in pt inside the widget (calculated by calcPlotScaling() from plotBorderTop,...
Definition jkqtfastplotter.h:539
bool maintainAspectRatio
indicates whether to maintain a specific aspect ratio
Definition jkqtfastplotter.h:331
QColor systemColor
color of the coordinate system
Definition jkqtfastplotter.h:191
void setPlotBackgroundColor(const QColor &__value)
color of the plot's background
Definition jkqtfastplotter.h:607
QColor gridColor
color of the coordinate grid
Definition jkqtfastplotter.h:230
virtual void mouseMoveEvent(QMouseEvent *event) override
event handler for a mouse move
void setPlotBorderBottom(int __value)
free space between widget bottom border and plot bottom border
Definition jkqtfastplotter.h:496
double default_labelFontSize
default value for property labelFontSize.
Definition jkqtfastplotter.h:248
QColor getGridColor() const
color of the coordinate grid
Definition jkqtfastplotter.h:641
QColor default_systemColor
default value for property systemColor.
Definition jkqtfastplotter.h:194
void setYMin(double value)
set yMin
double yMin
minimum value of y axis
Definition jkqtfastplotter.h:277
bool default_drawSystemBox
default value for property drawSystemBox.
Definition jkqtfastplotter.h:217
double tickLength
length of an axis tick (pixels)
Definition jkqtfastplotter.h:266
void setXTickDistance(double __value)
distance between two labels on x axis
Definition jkqtfastplotter.h:815
int internalPlotBorderTop
internally calculated: free space between widget top border and plot bottom border
Definition jkqtfastplotter.h:183
void setBackgroundColor(const QColor &__value)
color of the background
Definition jkqtfastplotter.h:594
QImage image
this stores the currently displayed plot
Definition jkqtfastplotter.h:124
QPoint mouseDragEnd
Definition jkqtfastplotter.h:334
JKQTFastPlotter * getSynchronizeX() const
synchronize x-axis settings to this plotter
Definition jkqtfastplotter.h:927
QString labelFontName
font name of the axis labels
Definition jkqtfastplotter.h:250
void setYTickDistance(double __value)
distance between two labels on y axis
Definition jkqtfastplotter.h:828
QColor getSystemColor() const
color of the coordinate system
Definition jkqtfastplotter.h:771
JKQTFastPlotter * getSynchronizeY() const
synchronize y-axis settings to this plotter
Definition jkqtfastplotter.h:940
QPen getDragShapePen() const
Definition jkqtfastplotter.h:464
bool getXAxisLabelVisible() const
plot x axis label
Definition jkqtfastplotter.h:901
void setXAxisLabel(const QString &__value)
label of x axis
Definition jkqtfastplotter.h:841
QString yAxisLabel
label of y axis
Definition jkqtfastplotter.h:308
double y2p(double y)
return y-pixel coordinate from y coordinate
Definition jkqtfastplotter.h:437
int getPlotBorderRight() const
free space between widget right border and plot left border
Definition jkqtfastplotter.h:517
double yScale
y axis scaling factor (calculated internally)
Definition jkqtfastplotter.h:294
void setSynchronizeX(JKQTFastPlotter *__value)
synchronize x-axis settings to this plotter
Definition jkqtfastplotter.h:919
void deletePlot(JKQTFPPlot *g, bool remove=false)
remove given graph
JKQTFastPlotter(QWidget *parent=nullptr)
class constructor
static const size_t LUTSIZE
size of the lookup tables used by JKQTFPimagePlot_array2image()
Definition jkqtfastplotter.h:116
void setTickFontName(const QString &__value)
font name of the tick labels
Definition jkqtfastplotter.h:711
void plotSystem(QPainter &painter)
paint the coordinate system
int plotHeight
plot height in pt inside the widget (calculated by calcPlotScaling() from plotBorderTop,...
Definition jkqtfastplotter.h:188
void copyImage()
copy the current plot image to the clipboard
double yWidth
width of plot on y axis (calculated internally)
Definition jkqtfastplotter.h:292
int internalPlotBorderBottom
internally calculated: free space between widget bottom border and plot bottom border
Definition jkqtfastplotter.h:171
void redrawPlot()
replot everything (slowest possible plotting)
void draw(QPainter *painter, QColor background, QSize *size)
draw the contents onto any QPainter, starting at (0,0), returns the size of the whole plot in size,...
void replotting()
emitted whenever the graph is replotted
double xTickDistance
distance between two labels on x axis
Definition jkqtfastplotter.h:302
double getLabelFontSize() const
font size (in points) of the axis labels
Definition jkqtfastplotter.h:680
int plotBorderTop
free space between widget top border and plot bottom border
Definition jkqtfastplotter.h:155
int default_plotBorderTop
default value for property plotBorderTop.
Definition jkqtfastplotter.h:158
void setXZeroTick(double __value)
a label position from which axis label plotting is started for the x axis
Definition jkqtfastplotter.h:789
int getInternalPlotBorderLeft() const
internally calculated: free space between widget left border and plot left border
Definition jkqtfastplotter.h:553
bool drawSystemBox
indicates whether to draw a system box
Definition jkqtfastplotter.h:214
int default_plotBorderBottom
default value for property plotBorderBottom.
Definition jkqtfastplotter.h:148
bool getYAxisLog() const
is x axis logarithmic?
Definition jkqtfastplotter.h:589
QString default_labelFontName
default value for property labelFontName.
Definition jkqtfastplotter.h:253
int getPlotNum(JKQTFPPlot *g)
return the internal number (0..N-1) of the given plot, or -1
double default_tickLength
default value for property tickLength.
Definition jkqtfastplotter.h:269
void setYAxisLabel(const QString &__value)
label of y axis
Definition jkqtfastplotter.h:854
int getInternalPlotBorderRight() const
internally calculated: free space between widget right border and plot left border
Definition jkqtfastplotter.h:561
bool xAxisLog
is x axis logarithmic?
Definition jkqtfastplotter.h:281
QMutex mutexRepaintSystem
mutex to lock system repaint
Definition jkqtfastplotter.h:379
double xOffset
x axis offset (calculated internally)
Definition jkqtfastplotter.h:290
void deletePlot(int id, bool remove=false)
remove given graph
void setPlotUpdateEnabled(bool __value)
if false the plotting won't be performed (may be used to set more than one parameter without replot
Definition jkqtfastplotter.h:543
bool drawGrid
indicates whether to draw a grid
Definition jkqtfastplotter.h:225
double getGridWidth() const
width of the coordinate grid (in pixel)
Definition jkqtfastplotter.h:667
QAction * actCopyImage
Definition jkqtfastplotter.h:340
void clicked(double x, double y, Qt::KeyboardModifiers modifiers)
emitted whenever the mouse is clicked inside the plot
bool yAxisLog
is x axis logarithmic?
Definition jkqtfastplotter.h:283
void setDragLine(bool __value)
Definition jkqtfastplotter.h:469
QPen dragShapePen
Definition jkqtfastplotter.h:337
double xWidth
width of plot on x axis (calculated internally)
Definition jkqtfastplotter.h:286
double systemWidth
width of the coordinate (in pixel)
Definition jkqtfastplotter.h:196
void setYMax(double value)
set yMax
virtual void mousePressEvent(QMouseEvent *event) override
event handler for a mouse button press
static const double ABS_MIN_LINEWIDTH
smallest allowed line width for JKQTFastPlotter
Definition jkqtfastplotter.h:112
void setGridColor(const QColor &__value)
color of the coordinate grid
Definition jkqtfastplotter.h:633
int default_plotBorderRight
default value for property plotBorderRight.
Definition jkqtfastplotter.h:153
bool getDragLine() const
Definition jkqtfastplotter.h:477
void setYAxisLabelVisible(bool __value)
plot y axis label
Definition jkqtfastplotter.h:906
int plotBorderRight
free space between widget right border and plot left border
Definition jkqtfastplotter.h:150
QColor getPlotBackgroundColor() const
color of the plot's background
Definition jkqtfastplotter.h:615
QImage systemImage
this stores the currently displayed coordinate system
Definition jkqtfastplotter.h:122
void setMaintainAspectRatio(bool __value)
indicates whether to maintain a specific aspect ratio
Definition jkqtfastplotter.h:880
int internalPlotBorderRight
internally calculated: free space between widget right border and plot left border
Definition jkqtfastplotter.h:177
QString getYAxisLabel() const
label of y axis
Definition jkqtfastplotter.h:862
int internalPlotBorderLeft
internally calculated: free space between widget left border and plot left border
Definition jkqtfastplotter.h:165
void plotGraphs(QPainter &painter)
paint the graphs
double labelFontSize
font size (in points) of the axis labels
Definition jkqtfastplotter.h:245
double getXTickDistance() const
distance between two labels on x axis
Definition jkqtfastplotter.h:823
int getPlotWidth() const
plot width in pt inside the widget (calculated by calcPlotScaling() from plotBorderLeft,...
Definition jkqtfastplotter.h:535
void setLabelFontSize(double __value)
font size (in points) of the axis labels
Definition jkqtfastplotter.h:672
QPoint mouseDragStart
Definition jkqtfastplotter.h:333
void plotterSizesChanged()
emitted whenever the graph sizes (borders, plotWidth, plotHeight) change
This class implements a high resolution timer capable of measuring time intervals with a resolution o...
Definition jkqtphighrestimer.h:89
double getTime()
get the time since the last call of start() in microseconds
void start()
start the timer
JKQTFASTPLOTTER_LIB_EXPORT QIcon JKQTFPimagePlot_getPaletteIcon(int i)
get QIcon representing the given palette
JKQTFASTPLOTTER_LIB_EXPORT QStringList JKQTFPimagePlot_getPalettes()
get list with all available palettes
#define JKQTFASTPLOTTER_LIB_EXPORT
Definition jkqtfastplotter_imexport.h:108
void JKQTFPRGBImageOverlayPlot_array2image(T *dbl, int width, int height, QImage &img, int channel, double minColor_, double maxColor_)
convert a 2D image (as 1D array) into a QImage and puts the image values into one color channel (set ...
Definition jkqtfastplotter.h:2655
JKQTFPImageFormat
datatype for an image plotpalette for coloring
Definition jkqtfastplotter.h:1827
JKQTFPColorPalette
An enum for selecting the palette for coloring.
Definition jkqtfastplotter.h:1799
void JKQTFPimagePlot_array2image(T *dbl, int width, int height, QImage &img, JKQTFPColorPalette palette, double minColor, double maxColor)
convert a 2D image (as 1D array) into a QImage with given palette (see JKQTFPColorPalette)
Definition jkqtfastplotter.h:1848
@ JKQTFP_uint8
8 bit int
Definition jkqtfastplotter.h:1828
@ JKQTFP_int64
64 bit signed int
Definition jkqtfastplotter.h:1833
@ JKQTFP_double
double
Definition jkqtfastplotter.h:1832
@ JKQTFP_float
float
Definition jkqtfastplotter.h:1831
@ JKQTFP_uint16
16 bit int
Definition jkqtfastplotter.h:1829
@ JKQTFP_uint32
32 bit int
Definition jkqtfastplotter.h:1830
@ JKQTFP_HOT
Definition jkqtfastplotter.h:1813
@ JKQTFP_TRAFFICLIGHT
Definition jkqtfastplotter.h:1815
@ JKQTFP_INVERTEDGREEN
Definition jkqtfastplotter.h:1803
@ JKQTFP_CYAN
Definition jkqtfastplotter.h:1818
@ JKQTFP_INVERTED_HSV
Definition jkqtfastplotter.h:1811
@ JKQTFP_INVERTEDBLUE
Definition jkqtfastplotter.h:1805
@ JKQTFP_GREEN
Definition jkqtfastplotter.h:1802
@ JKQTFP_RAINBOW
Definition jkqtfastplotter.h:1812
@ JKQTFP_OCEAN
Definition jkqtfastplotter.h:1814
@ JKQTFP_BLUE
Definition jkqtfastplotter.h:1804
@ JKQTFP_INVERTEDRED
Definition jkqtfastplotter.h:1801
@ JKQTFP_RYGB
Definition jkqtfastplotter.h:1809
@ JKQTFP_HSV
Definition jkqtfastplotter.h:1810
@ JKQTFP_RED
Definition jkqtfastplotter.h:1800
@ JKQTFP_BLUEYELLOW
Definition jkqtfastplotter.h:1817
@ JKQTFP_MATLAB
Definition jkqtfastplotter.h:1808
@ JKQTFP_BLUEMAGENTAYELLOW
Definition jkqtfastplotter.h:1816
@ JKQTFP_INVERTEDGRAY
Definition jkqtfastplotter.h:1807
@ JKQTFP_GRAY
Definition jkqtfastplotter.h:1806
#define JKQTPSTATISTICS_LN10
Definition jkqtpmathtools.h:70
#define JKQTPSTATISTICS_PI
Definition jkqtpmathtools.h:52