File tree Expand file tree Collapse file tree 3 files changed +10
-1
lines changed Expand file tree Collapse file tree 3 files changed +10
-1
lines changed Original file line number Diff line number Diff line change @@ -690,6 +690,7 @@ namespace matplot {
690690 // {{no}box { {linestyle | ls <line_style>}
691691 // | {linetype | lt <line_type>}
692692 // {linewidth | lw <line_width>}}}
693+ // {{no}opaque {fc <colorspec>}}
693694 include_comment (" Axes legend" );
694695 // Gnuplot version needs to be 5.2.6+ for keyentry
695696 bool ok = true ;
@@ -753,7 +754,7 @@ namespace matplot {
753754 cmd += legend_->vertical () ? " vertical" : " horizontal" ;
754755 // text aligned to the left
755756 cmd += " Left" ;
756- cmd += " opaque" ;
757+ cmd += legend_-> opaque () ? " opaque" : " noopaque " ;
757758 cmd +=
758759 legend_->label_after_sample () ? " reverse" : " noreverse" ;
759760 cmd += legend_->invert () ? " invert" : " noinvert" ;
Original file line number Diff line number Diff line change @@ -296,4 +296,8 @@ namespace matplot {
296296 num_columns_ = 0 ;
297297 touch ();
298298 }
299+
300+ bool legend::opaque () const { return opaque_; }
301+
302+ void legend::opaque (bool opaque) { opaque_ = opaque; };
299303} // namespace matplot
Original file line number Diff line number Diff line change @@ -123,6 +123,9 @@ namespace matplot {
123123 void text_color (const color_array &text_color);
124124 template <class T > void text_color (T c) { text_color (to_array (c)); }
125125
126+ bool opaque () const ;
127+ void opaque (bool opaque);
128+
126129 private:
127130 // The keys
128131 std::vector<std::string> strings_{};
@@ -150,6 +153,7 @@ namespace matplot {
150153 bool label_after_sample_{true };
151154 bool invert_{false };
152155 bool visible_{true };
156+ bool opaque_{true };
153157
154158 size_t num_columns_{0 };
155159 size_t num_rows_{0 };
You can’t perform that action at this time.
0 commit comments