MCPcopy Index your code
hub / github.com/matplotlib/matplotlib / set_color

Method set_color

lib/matplotlib/backends/backend_ps.py:448–454  ·  view source on GitHub ↗
(self, r, g, b, store=True)

Source from the content-addressed store, hash-verified

446 return False
447
448 def set_color(self, r, g, b, store=True):
449 if (r, g, b) != self.color:
450 self._pswriter.write(f"{_nums_to_str(r)} setgray\n"
451 if r == g == b else
452 f"{_nums_to_str(r, g, b)} setrgbcolor\n")
453 if store:
454 self.color = (r, g, b)
455
456 def set_linewidth(self, linewidth, store=True):
457 linewidth = float(linewidth)

Callers 13

draw_textMethod · 0.95
draw_mathtextMethod · 0.95
_draw_psMethod · 0.95
test_lasso_set_propsFunction · 0.45
test_mixed_collectionFunction · 0.45
test_twin_spinesFunction · 0.45
test_buffer_sizeFunction · 0.45

Calls 2

_nums_to_strFunction · 0.85
writeMethod · 0.45

Tested by 10

test_lasso_set_propsFunction · 0.36
test_mixed_collectionFunction · 0.36
test_twin_spinesFunction · 0.36
test_buffer_sizeFunction · 0.36