mirror of
https://github.com/aportelli/LatAnalyze.git
synced 2025-04-11 03:20:46 +01:00
Merge branch 'develop' into feature/reorg
This commit is contained in:
commit
302934de01
@ -327,6 +327,17 @@ void Color::operator()(PlotOptions &option) const
|
|||||||
option.lineColor = color_;
|
option.lineColor = color_;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// LineWidth constructor ///////////////////////////////////////////////////////
|
||||||
|
LineWidth::LineWidth(const unsigned int width)
|
||||||
|
: width_(width)
|
||||||
|
{}
|
||||||
|
|
||||||
|
// LineWidth modifier //////////////////////////////////////////////////////////
|
||||||
|
void LineWidth::operator()(PlotOptions &option) const
|
||||||
|
{
|
||||||
|
option.lineWidth = static_cast<int>(width_);
|
||||||
|
}
|
||||||
|
|
||||||
// LogScale constructor ////////////////////////////////////////////////////////
|
// LogScale constructor ////////////////////////////////////////////////////////
|
||||||
LogScale::LogScale(const Axis axis)
|
LogScale::LogScale(const Axis axis)
|
||||||
: axis_(axis)
|
: axis_(axis)
|
||||||
@ -440,6 +451,7 @@ void Plot::initOptions(void)
|
|||||||
options_.label[0] = "";
|
options_.label[0] = "";
|
||||||
options_.label[1] = "";
|
options_.label[1] = "";
|
||||||
options_.lineColor = "";
|
options_.lineColor = "";
|
||||||
|
options_.lineWidth = -1;
|
||||||
options_.palette = Palette::category10;
|
options_.palette = Palette::category10;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -470,6 +482,11 @@ Plot & Plot::operator<<(PlotObject &&command)
|
|||||||
commandStr += " lc " + options_.lineColor;
|
commandStr += " lc " + options_.lineColor;
|
||||||
options_.lineColor = "";
|
options_.lineColor = "";
|
||||||
}
|
}
|
||||||
|
if (options_.lineWidth > 0)
|
||||||
|
{
|
||||||
|
commandStr += " lw " + strFrom(options_.lineWidth);
|
||||||
|
options_.lineWidth = -1;
|
||||||
|
}
|
||||||
if (options_.title.empty())
|
if (options_.title.empty())
|
||||||
{
|
{
|
||||||
commandStr += " notitle";
|
commandStr += " notitle";
|
||||||
|
@ -189,6 +189,7 @@ struct PlotOptions
|
|||||||
Range scale[2];
|
Range scale[2];
|
||||||
std::string label[2];
|
std::string label[2];
|
||||||
std::string lineColor;
|
std::string lineColor;
|
||||||
|
int lineWidth;
|
||||||
std::vector<std::string> palette;
|
std::vector<std::string> palette;
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -241,6 +242,19 @@ private:
|
|||||||
const std::string color_;
|
const std::string color_;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
class LineWidth: public PlotModifier
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
// constructor
|
||||||
|
explicit LineWidth(const unsigned int width);
|
||||||
|
// destructor
|
||||||
|
virtual ~LineWidth(void) = default;
|
||||||
|
// modifier
|
||||||
|
virtual void operator()(PlotOptions &option) const;
|
||||||
|
private:
|
||||||
|
const unsigned width_;
|
||||||
|
};
|
||||||
|
|
||||||
class LogScale: public PlotModifier
|
class LogScale: public PlotModifier
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user