plot.loadCurrentPlotterStyle(QSettings(":/JKQTPlotter/styles/seaborn.ini", QSettings::IniFormat));
painter.save();
painter.setPen(Qt::NoPen);
QBrush b=painter.brush();
QBrush bDeco=b;
bDeco.setColor(b.color().lighter());
if (orientation==Qt::Vertical) {
const double dx=bar_px.width()/2.0;
const double r=dx*0.85;
painter.setBrush(bDeco);
painter.drawEllipse(QPointF(bar_px.center().x(), bar_px.top()+dx), r,r);
} else {
painter.setBrush(bDeco);
painter.drawEllipse(QPointF(bar_px.center().x(), bar_px.bottom()-dx), r,r);
}
} else {
const double dx=bar_px.height()/2.0;
const double r=dx*0.85;
painter.setBrush(bDeco);
painter.drawEllipse(QPointF(bar_px.right()-dx, bar_px.center().y()), r,r);
} else {
painter.setBrush(bDeco);
painter.drawEllipse(QPointF(bar_px.left()+dx, bar_px.center().y()), r,r);
}
}
painter.restore();
}
);
plot.addGraph(graph);
plot.zoomToFit();
plot.setWindowTitle(title);
plot.show();
plot.resize(400,400);
This is a base-class for all bar graphs with vertical or horizontal orientation (the orientation is i...
Definition jkqtpbarchartbase.h:152
void setCustomDrawingFunctor(JKQTPBarGraphBase::CustomDrawingFunctor &&f)
this allows to provide custom drawing code for the bars. It is called for every visible bar if activa...
virtual void setColor(QColor c)
set outline and fill color at the same time
void setUseCustomDrawFunctor(bool enabled)
enabled custom drawing by m_customDrawFunctor
This implements a vertical bar graph with bars between and .
Definition jkqtpbarchart.h:51
This class manages data columns (with entries of type double ), used by JKQTPlotter/JKQTBasePlotter t...
Definition jkqtpdatastorage.h:282
size_t addLinearColumn(size_t rows, double start, double end, const QString &name=QString(""))
add a column to the datastore that contains rows rows with monotonely increasing value starting at st...
size_t addColumnCalculatedFromColumn(size_t otherColumn, const std::function< double(double)> &f, const QString &name=QString(""))
Definition jkqtpdatastorage.h:1333
this class extends the QPainter
Definition jkqtpenhancedpainter.h:33
void drawComplexRoundedRect(const QRectF &r, double rTopLeft, double rTopRight, double rBottomLeft, double rBottomRight, Qt::SizeMode mode=Qt::AbsoluteSize)
draw a rounded rect, where each corner has a separate radius
double getBaseline() const
baseline of the plot (NOTE: 0 is interpreted as until plot border in log-mode!!!)
virtual void setValueColumn(int __value)
sets the column used as "value" for the current graph (typically this call setXColumn(),...
virtual void setKeyColumn(int __value)
sets the column used as "key" for the current graph (typically this call setXColumn(),...