class_docstr: Test using matplotlib styling to modify look of graphic.
class_docstr_tok: ["Test","using","matplotlib","styling","to","modify","look","of","graphic","."]
docstr: Test matplotlib styles impact figure styling for draw_mpl(circuit, style="rcParams").
docstr_tok: ["Test","matplotlib","styles","impact","figure","styling","for","draw_mpl","(","circuit",",","style=","''","rcParams","''",")","."]
code: def test_style_with_matplotlib(self):
      """Test matplotlib styles impact figure styling for draw_mpl(circuit, style="rcParams")."""
  
      plt.style.use("fivethirtyeight")
  
      _, ax = qml.draw_mpl(circuit1, style="rcParams")(1.23, 2.34)
  
      expected_facecolor = mpl.colors.to_rgba(
          plt.rcParams["patch.facecolor"]
      )
      assert ax.patches[0].get_facecolor() == expected_facecolor
      assert ax.patches[1].get_facecolor() == expected_facecolor
  
      expected_linecolor = mpl.colors.to_rgba(
          plt.rcParams["lines.color"]
      )
      for l in ax.lines[
          :-1
      ]:  # final is fancy arrow, has different styling
          assert mpl.colors.to_rgba(l.get_color()) == expected_linecolor
  
      qml.drawer.use_style("black_white")
      plt.close()
  
imports: import pytest
  import pennylane
label_desc: Use image node_id 2 for calling the TestMPLIntegration obj's underlying member method code with example usage: obj.test_style_with_matplotlib() without return types