54 std::map<double, std::string>
const&
labels,
55 std::string
const& name
66 ax_end_y = - settings.
length;
72 ax_end_x = settings.
length;
76 throw std::runtime_error(
"Invalid SvgAxisSettings::Position" );
79 auto axis_line =
SvgLine( 0.0, 0.0, ax_end_x, ax_end_y );
81 group << std::move( axis_line );
84 for(
auto const& label :
labels ) {
85 double const eps = 0.0000001;
86 if( !std::isfinite(label.first) || label.first < 0.0 - eps || label.first > 1.0 + eps ) {
87 throw std::runtime_error(
"Svg axis label position out of [ 0.0, 1.0 ]" );
92 double direction = 1.0;
108 auto const y_coord = - label.first * settings.
length;
117 auto const x_coord = label.first * settings.
length;
126 auto tick_line =
SvgLine( line_p1, line_p2 );
128 group << std::move( tick_line );
129 auto label_text =
SvgText( label.second );
144 group << std::move( label_text );
150 auto name_text =
SvgText( name );
153 if( !std::isfinite( settings.
offset ) || settings.
offset < 0.0 ) {
196 if( ! name.empty() ) {
197 group << std::move( name_text );
204 std::vector<Tickmarks::LabeledTick>
const&
labels,
205 std::string
const& name,
208 std::map<double, std::string> ticks;
209 for(
auto const& tick :
labels ) {
211 round_labels ? std::round( tick.label ) : tick.label