Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 17 additions & 0 deletions doc/_static/mpl.css
Original file line number Diff line number Diff line change
Expand Up @@ -582,6 +582,20 @@ table.docutils {
background-color: #eff3f4;
}

/* tables inside parameter descriptions */
td.field-body table.property-table {
width: 100%;
}

td.field-body table.property-table th {
padding: 2px 10px;
border: 0;
}

td.field-body table.property-table td {
padding: 2px 10px;
}

/* function and class description */
.descclassname {
color: #aaa;
Expand Down Expand Up @@ -638,6 +652,9 @@ dl.class {
font-family: monospace;
}

table.docutils.field-list {
width: 100%;
}

.docutils.field-list th {
background-color: #eee;
Expand Down
6 changes: 6 additions & 0 deletions lib/matplotlib/artist.py
Original file line number Diff line number Diff line change
Expand Up @@ -1281,6 +1281,12 @@ def pprint_setters_rest(self, prop=None, leadingspace=2):

col0_len = max(len(n) for n in names)
col1_len = max(len(a) for a in accepts)

lines.append('')
lines.append(pad + '.. table::')
lines.append(pad + ' :class: property-table')
pad += ' '

table_formatstr = pad + '=' * col0_len + ' ' + '=' * col1_len

lines.append('')
Expand Down