MCPcopy Create free account
hub / github.com/alandefreitas/matplotplusplus / data_string

Method data_string

source/matplot/axes_objects/bars.cpp:144–159  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

142 }
143
144 std::string bars::data_string() {
145 std::stringstream ss;
146 ss.precision(10);
147 ss << std::fixed;
148 double m = x_minimum_difference();
149 double cw = cluster_width();
150 for (size_t bar_group = 0; bar_group < ys_.size(); ++bar_group) {
151 for (size_t i = 0; i < ys_[bar_group].size(); ++i) {
152 // <box center> <box height> <box width>
153 ss << " " << x_end_point(bar_group, i) << " "
154 << ys_[bar_group][i] << " " << m * cw << "\n";
155 }
156 ss << "e\n";
157 }
158 return ss.str();
159 }
160
161 bool bars::requires_colormap() { return false; }
162

Callers

nothing calls this directly

Calls 1

sizeMethod · 0.45

Tested by

no test coverage detected