8000 Don't sort pdf dicts. · matplotlib/matplotlib@600a8af · GitHub
[go: up one dir, main page]

Skip to content

Commit 600a8af

Browse files
committed
Don't sort pdf dicts.
As for svg (10145a2), this makes outputs marginally easier to read, and is not necessary anymore now that dicts maintain insertion order.
1 parent c072e3a commit 600a8af

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

lib/matplotlib/backends/backend_pdf.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -297,8 +297,7 @@ def pdfRepr(obj):
297297
elif isinstance(obj, dict):
298298
return fill([
299299
b"<<",
300-
*[Name(key).pdfRepr() + b" " + pdfRepr(obj[key])
301-
for key in sorted(obj)],
300+
*[Name(k).pdfRepr() + b" " + pdfRepr(v) for k, v in obj.items()],
302301
b">>",
303302
])
304303

0 commit comments

Comments
 (0)
0