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

Method legend_string

source/matplot/axes_objects/network.cpp:88–105  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

86 }
87
88 std::string network::legend_string(std::string_view title) {
89 if (line_spec_.has_line() && line_spec_.has_non_custom_marker()) {
90 return " keyentry " +
91 line_spec_.plot_string(
92 line_spec::style_to_plot::plot_line_and_marker) +
93 " title \"" + escape(title) + "\"";
94 } else if (line_spec_.has_line()) {
95 return " keyentry " +
96 line_spec_.plot_string(
97 line_spec::style_to_plot::plot_line_only) +
98 " title \"" + escape(title) + "\"";
99 } else {
100 return " keyentry " +
101 line_spec_.plot_string(
102 line_spec::style_to_plot::plot_marker_only) +
103 " title \"" + escape(title) + "\"";
104 }
105 }
106
107 std::string network::data_string() {
108 std::stringstream ss;

Callers

nothing calls this directly

Calls 4

escapeFunction · 0.85
has_lineMethod · 0.80
has_non_custom_markerMethod · 0.80
plot_stringMethod · 0.45

Tested by

no test coverage detected