Thanks to visit codestin.com Credit goes to github.com
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent d571837 commit 2d95ffbCopy full SHA for 2d95ffb
1 file changed
lib/matplotlib/backends/backend_ps.py
@@ -98,14 +98,17 @@ def set_linecap(self, linecap):
98
self._pswriter.write("%s setlinecap\n"%_num_to_str(linecap))
99
self.linecap = linecap
100
101
- def set_linedash(self, offset, seq):
102
- if (offset,seq) != self.linedash:
103
- if seq is not None and len(seq):
104
- s="[%s] %d setdash\n"%(_nums_to_str(*seq), offset)
105
- self._pswriter.write(s)
106
- else:
107
- self._pswriter.write("[] 0 setdash\n")
108
- self.linedash = (offset,seq)
+ def set_linedash(self, offset, seq):
+ if self.linedash is not None:
+ oldo, oldseq = self.linedash
+ if offset==oldo and seq==oldseq: return
+
+ if seq is not None and len(seq):
+ s="[%s] %d setdash\n"%(_nums_to_str(*seq), offset)
+ self._pswriter.write(s)
109
+ else:
110
+ self._pswriter.write("[] 0 setdash\n")
111
+ self.linedash = (offset,seq)
112
113
def set_font(self, fontname, fontsize):
114
if (fontname,fontsize) != (self.fontname,self.fontsize):
0 commit comments