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

Method plot_string

source/matplot/axes_objects/labels.cpp:43–66  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

41 }
42
43 std::string labels::plot_string() {
44 std::string res = " '-' with labels";
45 switch (alignment_) {
46 case alignment::left:
47 res += " left";
48 break;
49 case alignment::right:
50 res += " right";
51 break;
52 case alignment::center:
53 res += " center";
54 break;
55 default:
56 break;
57 }
58 res += " font \"" + escape(font()) + "," +
59 num2str(unsigned(font_size())) + "\"";
60 if (!colors_.empty()) {
61 res += " textcolor palette";
62 } else {
63 res += " textcolor rgb '" + to_string(color_) + "'";
64 }
65 return res;
66 }
67
68 std::string labels::data_string() {
69 // in absolute size, the rectangles match the words when

Callers

nothing calls this directly

Calls 4

escapeFunction · 0.85
num2strFunction · 0.85
to_stringFunction · 0.85
emptyMethod · 0.80

Tested by

no test coverage detected