22#ifndef JKQTFASTPLOTTER_H
23#define JKQTFASTPLOTTER_H
25#include "jkqtfastplotter_imexport.h"
40#if (QT_VERSION>=QT_VERSION_CHECK(6, 0, 0))
41#include <QtOpenGLWidgets/QOpenGLWidget>
42#define JKQTFASTPLOTTER_BASE QOpenGLWidget
45#define JKQTFASTPLOTTER_BASE QGLWidget
47#include "jkqtcommon/jkqtpmathtools.h"
49# include "jkqtcommon/jkqtphighrestimer.h"
101 #if (QT_VERSION>=QT_VERSION_CHECK(6, 0, 0))
386 void setXRange(
double min,
double max,
bool logarithmic=
false);
389 void setYRange(
double min,
double max,
bool logarithmic=
false);
392 void setXYRange(
double xmin,
double xmax,
double ymin,
double ymax,
bool xlogarithmic=
false,
bool ylogarithmic=
false);
418 inline double x2p(
double x) {
423 return xOffset+x*xScale;
428 inline double p2x(
long x) {
432 return (
static_cast<double>(x)-xOffset)/(xScale);
437 inline double y2p(
double y) {
442 return yOffset-y*yScale;
447 inline double p2y(
long y) {
451 return (
static_cast<double>(y)-yOffset)/(-1.0*yScale);
458 if (this->dragShapePen != __value) {
459 this->dragShapePen = __value;
466 return this->dragShapePen;
471 if (this->dragLine != __value) {
472 this->dragLine = __value;
479 return this->dragLine;
485 if (this->plotBorderLeft != __value) {
486 this->plotBorderLeft = __value;
493 return this->plotBorderLeft;
498 if (this->plotBorderBottom != __value) {
499 this->plotBorderBottom = __value;
506 return this->plotBorderBottom;
511 if (this->plotBorderRight != __value) {
512 this->plotBorderRight = __value;
519 return this->plotBorderRight;
524 if (this->plotBorderTop != __value) {
525 this->plotBorderTop = __value;
532 return this->plotBorderTop;
536 return this->plotWidth;
540 return this->plotHeight;
545 this->doDrawing = __value;
550 return this->doDrawing;
554 return this->internalPlotBorderLeft;
558 return this->internalPlotBorderBottom;
562 return this->internalPlotBorderRight;
566 return this->internalPlotBorderTop;
586 return this->xAxisLog;
590 return this->yAxisLog;
596 if (this->backgroundColor != __value) {
597 this->backgroundColor = __value;
604 return this->backgroundColor;
609 if (this->plotBackgroundColor != __value) {
610 this->plotBackgroundColor = __value;
617 return this->plotBackgroundColor;
622 if (this->drawGrid != __value) {
623 this->drawGrid = __value;
630 return this->drawGrid;
635 if (this->gridColor != __value) {
636 this->gridColor = __value;
643 return this->gridColor;
648 if (this->gridStyle != __value) {
649 this->gridStyle = __value;
656 return this->gridStyle;
661 if (this->gridWidth != __value) {
662 this->gridWidth = __value;
669 return this->gridWidth;
674 if (this->labelFontSize != __value) {
675 this->labelFontSize = __value;
682 return this->labelFontSize;
687 if (this->labelFontName != __value) {
688 this->labelFontName = __value;
695 return this->labelFontName;
700 if (this->tickFontSize != __value) {
701 this->tickFontSize = __value;
708 return this->tickFontSize;
713 if (this->tickFontName != __value) {
714 this->tickFontName = __value;
721 return this->tickFontName;
726 if (this->tickLength != __value) {
727 this->tickLength = __value;
734 return this->tickLength;
739 if (this->drawSystemBox != __value) {
740 this->drawSystemBox = __value;
747 return this->drawSystemBox;
752 if (this->drawZeroAxes != __value) {
753 this->drawZeroAxes = __value;
760 return this->drawZeroAxes;
765 if (this->systemColor != __value) {
766 this->systemColor = __value;
773 return this->systemColor;
778 if (this->systemWidth != __value) {
779 this->systemWidth = __value;
786 return this->systemWidth;
791 if (this->xZeroTick != __value) {
792 this->xZeroTick = __value;
799 return this->xZeroTick;
804 if (this->yZeroTick != __value) {
805 this->yZeroTick = __value;
812 return this->yZeroTick;
817 if (this->xTickDistance != __value) {
818 this->xTickDistance = __value;
825 return this->xTickDistance;
830 if (this->yTickDistance != __value) {
831 this->yTickDistance = __value;
838 return this->yTickDistance;
843 if (this->xAxisLabel != __value) {
844 this->xAxisLabel = __value;
851 return this->xAxisLabel;
856 if (this->yAxisLabel != __value) {
857 this->yAxisLabel = __value;
864 return this->yAxisLabel;
869 if (this->aspectRatio != __value) {
870 this->aspectRatio = __value;
877 return this->aspectRatio;
882 if (this->maintainAspectRatio != __value) {
883 this->maintainAspectRatio = __value;
890 return this->maintainAspectRatio;
895 if (this->xAxisLabelVisible != __value) {
896 this->xAxisLabelVisible = __value;
903 return this->xAxisLabelVisible;
908 if (this->yAxisLabelVisible != __value) {
909 this->yAxisLabelVisible = __value;
916 return this->yAxisLabelVisible;
921 if (this->synchronizeX != __value) {
922 this->synchronizeX = __value;
929 return this->synchronizeX;
934 if (this->synchronizeY != __value) {
935 this->synchronizeY = __value;
942 return this->synchronizeY;
946 void draw(QPainter* painter, QSize* size=
nullptr);
949 void draw(QPainter* painter, QColor background, QSize* size);
959 void clicked(
double x,
double y, Qt::KeyboardModifiers modifiers);
967 void mouseDragged(
double x_start,
double y_start,
double x_end,
double y_end, Qt::KeyboardModifiers modifiers);
969 void mouseDragFinished(
double x_start,
double y_start,
double x_end,
double y_end, Qt::KeyboardModifiers modifiers);
1036 void setVisible(
bool visible) { this->visible=visible; replot(); }
1111 inline void setData(
double* x,
double* y,
int N) {
1116 datatype=JKQTFPLPPointer;
1120 inline void setData(
double* x,
double* y,
double* yerr,
int N) {
1125 datatype=JKQTFPLPPointer;
1129 inline void setData(QVector<double>* x, QVector<double>* y) {
1135 this->yerrv=
nullptr;
1137 datatype=JKQTFPLPVector;
1141 inline void setData(QVector<double>* x, QVector<double>* y, QVector<double>* yerr) {
1149 datatype=JKQTFPLPVector;
1154 if (datatype==JKQTFPLPPointer)
1156 if (datatype==JKQTFPLPVector)
1187 return this->datatype;
1192 if (this->color != __value) {
1193 this->color = __value;
1205 if (this->style != __value) {
1206 this->style = __value;
1218 if (this->width != __value) {
1219 this->width = __value;
1231 if (this->errorColor != __value) {
1232 this->errorColor = __value;
1239 return this->errorColor;
1244 if (this->errorStyle != __value) {
1245 this->errorStyle = __value;
1252 return this->errorStyle;
1257 if (this->errorWidth != __value) {
1258 this->errorWidth = __value;
1265 return this->errorWidth;
1310 if (this->crossWidth != __value) {
1311 this->crossWidth = __value;
1318 return this->crossWidth;
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) ;
1408 if (this->color != __value) {
1409 this->color = __value;
1421 if (this->fillColor != __value) {
1422 this->fillColor = __value;
1429 return this->fillColor;
1434 if (this->fillStyle != __value) {
1435 this->fillStyle = __value;
1442 return this->fillStyle;
1447 if (this->style != __value) {
1448 this->style = __value;
1460 if (this->width != __value) {
1461 this->width = __value;
1480 return this->centerline;
1485 if (this->showCenterline != __value) {
1486 this->showCenterline = __value;
1493 return this->showCenterline;
1497 if (this->centerline!=centerline) {
1498 this->centerline=centerline;
1503 if (this->xmin!=xmin) {
1509 if (this->xmax!=xmax) {
1515 if (this->xmin!=xmin) {
1521 if (this->xmax!=xmax) {
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) ;
1573 if (this->color != __value) {
1574 this->color = __value;
1586 if (this->fillColor != __value) {
1587 this->fillColor = __value;
1594 return this->fillColor;
1599 if (this->fillStyle != __value) {
1600 this->fillStyle = __value;
1607 return this->fillStyle;
1612 if (this->style != __value) {
1613 this->style = __value;
1625 if (this->width != __value) {
1626 this->width = __value;
1645 return this->centerline;
1650 if (this->showCenterline != __value) {
1651 this->showCenterline = __value;
1658 return this->showCenterline;
1662 if (this->centerline!=centerline) {
1663 this->centerline=centerline;
1668 if (this->ymin!=xmin) {
1674 if (this->ymax!=xmax) {
1680 if (this->ymin!=xmin) {
1686 if (this->ymax!=xmax) {
1726 if (this->image != __value) {
1727 this->image = __value;
1739 if (this->xmin != __value) {
1740 this->xmin = __value;
1752 if (this->xmax != __value) {
1753 this->xmax = __value;
1765 if (this->ymin != __value) {
1766 this->ymin = __value;
1778 if (this->ymax != __value) {
1779 this->ymax = __value;
1857 std::cout<<
" timing JKQTFPimagePlot_array2image:\n";
1863 if (minColor == maxColor) {
1864 for (
int i=1; i<width*height; ++i)
1879 std::cout<<
" finding min&max: "<<time_gt/1000.0<<
" ms\n";
1884 double delta=max-min;
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;
1908 img = QImage(width, height, QImage::Format_ARGB32_Premultiplied);
1915 QRgb** plut=&lut_red;
1916 if ((*plut)==
nullptr) {
1918 if ((*plut)!=
nullptr) {
1921 (*plut)[l]=qRgb(
static_cast<int>(255.0*v), 0, 0);
1930 QRgb** plut=&lut_green;
1931 if ((*plut)==
nullptr) {
1933 if ((*plut)!=
nullptr) {
1936 (*plut)[l]=qRgb(0,
static_cast<int>(255.0*v), 0);
1945 QRgb** plut=&lut_blue;
1946 if ((*plut)==
nullptr) {
1948 if ((*plut)!=
nullptr) {
1951 (*plut)[l]=qRgb(0, 0,
static_cast<int>(255.0*v));
1962 QRgb** plut=&lut_gray;
1963 if ((*plut)==
nullptr) {
1965 if ((*plut)!=
nullptr) {
1968 (*plut)[l]=qRgb(
static_cast<int>(255.0*v),
1969 static_cast<int>(255.0*v),
1970 static_cast<int>(255.0*v));
1979 QRgb** plut=&lut_invred;
1980 if ((*plut)==
nullptr) {
1982 if ((*plut)!=
nullptr) {
1985 (*plut)[l]=qRgb(
static_cast<int>(255.0*(1.0-v)), 0, 0);
1994 QRgb** plut=&lut_invgreen;
1995 if ((*plut)==
nullptr) {
1997 if ((*plut)!=
nullptr) {
2000 (*plut)[l]=qRgb(0,
static_cast<int>(255.0*(1.0-v)), 0);
2008 QRgb** plut=&lut_invblue;
2009 if ((*plut)==
nullptr) {
2011 if ((*plut)!=
nullptr) {
2014 (*plut)[l]=qRgb(0, 0,
static_cast<int>(255.0*(1.0-v)));
2022 QRgb** plut=&lut_invgray;
2023 if ((*plut)==
nullptr) {
2025 if ((*plut)!=
nullptr) {
2028 (*plut)[l]=qRgb(
static_cast<int>(255.0*v),
2029 static_cast<int>(255.0*v),
2030 static_cast<int>(255.0*v));
2039 QRgb** plut=&lut_matlab;
2040 if ((*plut)==
nullptr) {
2042 if ((*plut)!=
nullptr) {
2045 double r = 382.5 - 1020.0 * std::abs(v - 0.75);
2051 double g = 382.5 - 1020.0 * std::abs(v - 0.5);
2057 double b = 382.5 - 1020.0 * std::abs(v - 0.25);
2063 (*plut)[l]=qRgb(
static_cast<int>(r),
static_cast<int>(g),
static_cast<int>(b));
2072 QRgb** plut=&lut_rygb;
2073 if ((*plut)==
nullptr) {
2075 if ((*plut)!=
nullptr) {
2078 double r = 796.875*v - 199.21875;
2086 double b = 255.0 - 765.0 * v;
2089 (*plut)[l]=qRgb(
static_cast<int>(r),
static_cast<int>(g),
static_cast<int>(b));
2098 QRgb** plut=&lut_hsv;
2099 if ((*plut)==
nullptr) {
2101 if ((*plut)!=
nullptr) {
2104 int h =
static_cast<int>(floor(6*v));
2105 double f = 6*v-double(h);
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;
2124 QRgb** plut=&lut_invhsv;
2125 if ((*plut)==
nullptr) {
2127 if ((*plut)!=
nullptr) {
2130 int h =
static_cast<int>(floor(6.0-6.0*v));
2131 double f = 6.0-6.0*v-double(h);
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;
2151 if (lut_rainbow==
nullptr) {
2154 if (lut_rainbow!=
nullptr) {
2157 double r = 255.0*std::abs(2.0*v-0.5);
2165 lut_rainbow[l]=qRgb(
static_cast<int>(r),
static_cast<int>(g),
static_cast<int>(b));
2169 lut_used=lut_rainbow;
2173 QRgb** plut=&lut_hot;
2174 if ((*plut)==
nullptr) {
2176 if ((*plut)!=
nullptr) {
2183 double g = 765.0*v-255.0;
2189 double b = 765.0*v-510.0;
2192 (*plut)[l]=qRgb(
static_cast<int>(r),
static_cast<int>(g),
static_cast<int>(b));
2200 QRgb** plut=&lut_ocean;
2201 if ((*plut)==
nullptr) {
2203 if ((*plut)!=
nullptr) {
2206 double r = 765.0*v-510.0;
2210 double g = std::abs(382.5*v-127.5);
2213 (*plut)[l]=qRgb(
static_cast<int>(r),
static_cast<int>(g),
static_cast<int>(b));
2221 QRgb** plut=&lut_bluemagentayellow;
2222 if ((*plut)==
nullptr) {
2224 if ((*plut)!=
nullptr) {
2227 double r = (v/0.32-0.78125);
2228 if (r < 0.0) r = 0.0;
2229 if (r > 1.0) r = 1.0;
2231 double g = 2.0*v-0.84;
2232 if (g < 0.0) g = 0.0;
2233 if (g > 1.0) g = 1.0;
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;
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));
2250 QRgb** plut=&lut_blueyellow;
2251 if ((*plut)==
nullptr) {
2253 if ((*plut)!=
nullptr) {
2256 double r = sqrt(sqrt(v));
2257 if (r < 0.0) r = 0.0;
2258 if (r > 1.0) r = 1.0;
2261 if (g < 0.0) g = 0.0;
2262 if (g > 1.0) g = 1.0;
2265 if (b < 0.0) b = 0.0;
2266 if (b > 1.0) b = 1.0;
2268 (*plut)[l]=qRgb(
static_cast<int>(255.0*r),
static_cast<int>(255.0*g),
static_cast<int>(255.0*b));
2277 QRgb** plut=&lut_cyan;
2278 if ((*plut)==
nullptr) {
2280 if ((*plut)!=
nullptr) {
2284 if (r < 0.0) r = 0.0;
2285 if (r > 1.0) r = 1.0;
2288 if (g < 0.0) g = 0.0;
2289 if (g > 1.0) g = 1.0;
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));
2303 QRgb** plut=&lut_trafficlight;
2304 if ((*plut)==
nullptr) {
2306 if ((*plut)!=
nullptr) {
2313 double g = (v < 0.5) ? 512.0*v+128.0 : 512.0-512.0*v;
2316 (*plut)[l]=qRgb(
static_cast<int>(r),
static_cast<int>(g), 0);
2327 std::cout<<
" calculated/found LUT: "<<time_gt/1000.0<<
" ms\n";
2330 if (lut_used!=
nullptr) {
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) {
2337 line[i]=lut_used[v];
2348 std::cout<<
" creating colored image: "<<time_gt/1000.0<<
" ms\n";
2354 std::cout<<
" sum: "<<time_sum/1000.0<<
" ms\n";
2437 if (this->image != __value) {
2438 this->image = __value;
2450 if (this->imageFormat != __value) {
2451 this->imageFormat = __value;
2458 return this->imageFormat;
2463 if (this->width != __value) {
2464 this->width = __value;
2476 if (this->height != __value) {
2477 this->height = __value;
2484 return this->height;
2489 if (this->xmin != __value) {
2490 this->xmin = __value;
2502 if (this->xmax != __value) {
2503 this->xmax = __value;
2515 if (this->ymin != __value) {
2516 this->ymin = __value;
2528 if (this->ymax != __value) {
2529 this->ymax = __value;
2541 if (this->drawColorBar != __value) {
2542 this->drawColorBar = __value;
2549 return this->drawColorBar;
2554 if (this->colorBarWidth != __value) {
2555 this->colorBarWidth = __value;
2562 return this->colorBarWidth;
2566 return this->rotation;
2570 return this->palette;
2574 return this->colorMin;
2578 return this->colorMax;
2582 this->imageFormat=imageFormat;
2584 this->height=height;
2589 if (this->rotation!=rotation) {
2590 this->rotation=rotation;
2595 if (this->palette!=palette) {
2601 if (this->palette!=palette) {
2602 this->palette=palette;
2607 if (this->colorMin!=colorMin) {
2608 this-> colorMin= colorMin;
2613 if (this->colorMax!=colorMax) {
2614 this->colorMax=colorMax;
2619 if (this->colorMin!=colorMin) {
2620 this-> colorMin= colorMin;
2625 if (this->colorMax!=colorMax) {
2626 this->colorMax=colorMax;
2631 if (this->colorMin!=colorMin) {
2632 this-> colorMin= colorMin;
2637 if (this->colorMax!=colorMax) {
2638 this->colorMax=colorMax;
2660 T minColor=
static_cast<T
>(minColor_);
2661 T maxColor=
static_cast<T
>(maxColor_);
2667 std::cout<<
" timing JKQTFPimagePlot_array2image:\n";
2674 if (minColor == maxColor) {
2675 for (
int i=1; i<width*height; ++i)
2690 std::cout<<
" finding min&max: "<<time_gt/1000.0<<
" ms\n";
2695 double delta=max-min;
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));
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));
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);
2738 std::cout<<
" creating colored image: "<<time_gt/1000.0<<
" ms\n";
2743 std::cout<<
" sum: "<<time_sum/1000.0<<
" ms\n";
2822 if (this->imageRed != __value) {
2823 this->imageRed = __value;
2826 if (this->imageFormatRed != __value2) {
2827 this->imageFormatRed = __value2;
2845 if (this->imageGreen != __value) {
2846 this->imageGreen = __value;
2849 if (this->imageFormatGreen != __value2) {
2850 this->imageFormatGreen = __value2;
2868 if (this->imageBlue != __value) {
2869 this->imageBlue = __value;
2872 if (this->imageFormatBlue != __value2) {
2873 this->imageFormatBlue = __value2;
2887 if (this->width != __value) {
2888 this->width = __value;
2900 if (this->height != __value) {
2901 this->height = __value;
2908 return this->height;
2913 if (this->xmin != __value) {
2914 this->xmin = __value;
2926 if (this->xmax != __value) {
2927 this->xmax = __value;
2939 if (this->ymin != __value) {
2940 this->ymin = __value;
2952 if (this->ymax != __value) {
2953 this->ymax = __value;
2964 return this->rotation;
2968 return this->colorMinRed;
2972 return this->colorMaxRed;
2976 return this->colorMinGreen;
2980 return this->colorMaxGreen;
2984 return this->colorMinBlue;
2988 return this->colorMaxBlue;
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);
2998 if (this->rotation!=rotation) {
2999 this->rotation=rotation;
3004 if (this->colorMinRed!=colorMin) {
3005 this-> colorMinRed= colorMin;
3010 if (this->colorMaxRed!=colorMax) {
3011 this->colorMaxRed=colorMax;
3016 if (this->colorMinRed!=colorMin) {
3017 this-> colorMinRed= colorMin;
3022 if (this->colorMaxRed!=colorMax) {
3023 this->colorMaxRed=colorMax;
3028 if (this->colorMinRed!=colorMin) {
3029 this-> colorMinRed= colorMin;
3034 if (this->colorMaxRed!=colorMax) {
3035 this->colorMaxRed=colorMax;
3042 if (this->colorMinGreen!=colorMin) {
3043 this-> colorMinGreen= colorMin;
3048 if (this->colorMaxGreen!=colorMax) {
3049 this->colorMaxGreen=colorMax;
3054 if (this->colorMinGreen!=colorMin) {
3055 this-> colorMinGreen= colorMin;
3060 if (this->colorMaxGreen!=colorMax) {
3061 this->colorMaxGreen=colorMax;
3066 if (this->colorMinGreen!=colorMin) {
3067 this-> colorMinGreen= colorMin;
3072 if (this->colorMaxGreen!=colorMax) {
3073 this->colorMaxGreen=colorMax;
3079 if (this->colorMinBlue!=colorMin) {
3080 this-> colorMinBlue= colorMin;
3085 if (this->colorMaxBlue!=colorMax) {
3086 this->colorMaxBlue=colorMax;
3091 if (this->colorMinBlue!=colorMin) {
3092 this-> colorMinBlue= colorMin;
3097 if (this->colorMaxBlue!=colorMax) {
3098 this->colorMaxBlue=colorMax;
3103 if (this->colorMinBlue!=colorMin) {
3104 this-> colorMinBlue= colorMin;
3109 if (this->colorMaxBlue!=colorMax) {
3110 this->colorMaxBlue=colorMax;
3166 void setData(
bool* image,
int width,
int height) {
3169 this->height=height;
3179 return this->rotation;
3187 return this->height;
3192 if (this->xmin != __value) {
3193 this->xmin = __value;
3205 if (this->xmax != __value) {
3206 this->xmax = __value;
3218 if (this->ymin != __value) {
3219 this->ymin = __value;
3231 if (this->ymax != __value) {
3232 this->ymax = __value;
3244 if (this->showAsSymbols != __value) {
3245 this->showAsSymbols = __value;
3252 return this->showAsSymbols;
3260 if (this->rotation!=rotation) {
3261 this->rotation=rotation;
3266 if (this->color!=color) {
3316 if (this->width != __value) {
3317 this->width = __value;
3329 if (this->lineWidth != __value) {
3330 this->lineWidth = __value;
3337 return this->lineWidth;
3342 if (this->color != __value) {
3343 this->color = __value;
3355 if (this->label != __value) {
3356 this->label = __value;
3368 if (this->font != __value) {
3369 this->font = __value;
3381 if (this->position != __value) {
3382 this->position = __value;
3389 return this->position;
3393 setPosition(
static_cast<Position>(pos));
3430 if (this->width != __value) {
3431 this->width = __value;
3443 if (this->lineWidth != __value) {
3444 this->lineWidth = __value;
3451 return this->lineWidth;
3456 if (this->color != __value) {
3457 this->color = __value;
3469 if (this->style != __value) {
3470 this->style = __value;
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