You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
EIDOS_TERMINATION << "ERROR (Plot::ExecuteMethod_legendPointEntry): legendPointEntry() requires the elements of size to be in (0, 1000]." << EidosTerminate(nullptr);
535
536
536
537
if (!plotview_->legendAdded())
537
-
EIDOS_TERMINATION << "ERROR (Plot::ExecuteMethod_legendLineEntry): addLegend() must be called before adding legend entries." << EidosTerminate(nullptr);
538
+
EIDOS_TERMINATION << "ERROR (Plot::ExecuteMethod_legendPointEntry): addLegend() must be called before adding legend entries." << EidosTerminate(nullptr);
EIDOS_TERMINATION << "ERROR (Plot::ExecuteMethod_legendLineEntry): addLegend() must be called before adding legend entries." << EidosTerminate(nullptr);
568
+
EIDOS_TERMINATION << "ERROR (Plot::ExecuteMethod_legendSwatchEntry): addLegend() must be called before adding legend entries." << EidosTerminate(nullptr);
EIDOS_TERMINATION << "ERROR (Plot::ExecuteMethod_legendTitleEntry): addLegend() must be called before adding legend entries." << EidosTerminate(nullptr);
587
+
588
+
plotview_->addLegendTitleEntry(label);
589
+
590
+
returngStaticEidosValueVOID;
591
+
}
592
+
574
593
// ********************* – (void)lines(numeric x, numeric y, [string$ color = "red"], [numeric$ lwd = 1.0], [float$ alpha = 1.0])
Copy file name to clipboardExpand all lines: QtSLiM/help/SLiMHelpClasses.html
+2Lines changed: 2 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -772,6 +772,8 @@
772
772
<p class="p6">Adds a legend entry with text <span class="s1">label</span> to the plot.<span class="Apple-converted-space"> </span>The entry will be displayed as a point symbol specified by <span class="s1">symbol</span>, <span class="s1">color</span>, <span class="s1">border</span>, <span class="s1">lwd</span>, and <span class="s1">size</span>, mirroring the appearance produced by <span class="s1">points()</span> for the same parameters; see <span class="s1">points()</span> for further details.<span class="Apple-converted-space"> </span>If one or more other legend entries already exist with the same label, the new entry will be drawn on top of the previously set entries for that label (allowing legend entries that display both a line and a point, for example).</p>
773
773
<p class="p5">– (void)legendSwatchEntry(string$ label, [string$ color = "red"])</p>
774
774
<p class="p6">Adds a legend entry with text <span class="s1">label</span> to the plot.<span class="Apple-converted-space"> </span>The entry will be displayed as a swatch drawn in color <span class="s1">color</span>.<span class="Apple-converted-space"> </span>If one or more other legend entries already exist with the same label, the new entry will be drawn on top of the previously set entries for that label (allowing legend entries that display both a line and a point, for example).</p>
<p class="p6">Adds a legend entry with text <span class="s1">label</span> to the plot.<span class="Apple-converted-space"> </span>The entry will be displayed as a title, left-aligned with no graphical representation (no line, point, or swatch).<span class="Apple-converted-space"> </span>A label of <span class="s1">""</span>, the empty string, is allowed and will produce a blank line in the legend (for spacing).<span class="Apple-converted-space"> </span>Note that title entries always produce their own separate line in the legend; they do not participate in the overdrawing scheme used for other types of legend entries.</p>
775
777
<p class="p5">– (void)lines(numeric x, numeric y, [string$ color = "red"], [numeric$ lwd = 1.0], [float$ alpha = 1.0])</p>
776
778
<p class="p6">Adds line data given by <span class="s1">x</span> and <span class="s1">y</span> to the plot.<span class="Apple-converted-space"> </span>The data will be plotted as a series of connected line segments, following the (<i>x</i>, <i>y</i>) positions given; note that the <span class="s1">x</span> and <span class="s1">y</span> vectors must be the same length.<span class="Apple-converted-space"> </span>The new line data will be plotted on top of any previously added data.</p>
777
779
<p class="p6">The lines will be drawn in color <span class="s1">color</span>, using line width <span class="s1">lwd</span>, with opacity <span class="s1">alpha</span>.<span class="Apple-converted-space"> </span>Alpha values must be in [<span class="s1">0.0</span>, <span class="s1">1.0</span>], where <span class="s1">0.0</span> is fully transparent and <span class="s1">1.0</span> is fully opaque.<span class="Apple-converted-space"> </span>Unlike <span class="s1">points()</span> and <span class="s1">text()</span>, the parameters <span class="s1">color</span>, <span class="s1">lwd</span>, and <span class="s1">alpha</span> must be singletons, since each point (except the two ends) is shared by two line segments; if you wish to vary the color/width/opacity for each line segment, separate calls to <span class="s1">lines()</span> are necessary. <span class="Apple-converted-space"> </span>See also <span class="s1">abline()</span>.</p>
Copy file name to clipboardExpand all lines: SLiMgui/SLiMHelpClasses.rtf
+10Lines changed: 10 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -6826,6 +6826,16 @@ The
6826
6826
\f4\fs20 . If one or more other legend entries already exist with the same label, the new entry will be drawn on top of the previously set entries for that label (allowing legend entries that display both a line and a point, for example).\
\f4\fs20 to the plot. The entry will be displayed as a title, left-aligned with no graphical representation (no line, point, or swatch). A label of
6835
+
\f3\fs18 ""
6836
+
\f4\fs20 , the empty string, is allowed and will produce a blank line in the legend (for spacing). Note that title entries always produce their own separate line in the legend; they do not participate in the overdrawing scheme used for other types of legend entries.\
0 commit comments