Skip to content

Commit babb03e

Browse files
committed
Document prepare_data.
1 parent 4cab2e7 commit babb03e

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

lib/matplotlib/backends/qt_editor/figureoptions.py

+9
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,15 @@ def figure_edit(axes, parent=None):
8181

8282
def prepare_data(d, init):
8383
"""Prepare entry for FormLayout.
84+
85+
`d` is a mapping of values to representations (a single value may
86+
have multiple representations, in particular the marker styles
87+
`None`, `"None"`, `"none"` and `""` are synonyms); `init` is one
88+
representation of the initial value.
89+
90+
This function returns an list suitable for initializing a
91+
FormLayout combobox, namely `[initial_representation, (value,
92+
representation), (value, representation), ...]`.
8493
"""
8594
# List items in dict, dropping duplicate values, sorting by values.
8695
kvs = [(k, v) for v, k in

0 commit comments

Comments
 (0)