plot graph
Title
Question
if i want a transparent graph what all should we do to get a transparent background graph directly is their a solution.
Python-3.4.3 Embellishing-a-plot 05-06 min 30-40 sec
Answers:
Use transparent=True
import matplotlib.pyplot as plt
fig = plt.figure()
plt.plot(range(10))
fig.savefig('temp.png', transparent=True)
<pre class="lang-py s-code-block hljs python" style="margin-bottom: calc(var(--s-prose-spacing) + 0.4em); padding: 12px; border-width: 0px; border-style: initial; border-color: initial; font-variant-numeric: inherit; font-variant-east-asian: inherit; font-stretch: inherit; line-height: 1.30769; font-family: Consolas, Menlo, Monaco, "Lucida Console", "Liberation Mono", "DejaVu Sans Mono", "Bitstream Vera Sans Mono", "Courier New", monospace, sans-serif; font-size: 13px; vertical-align: baseline; box-sizing: inherit; width: auto; max-height: 600px; overflow: auto; background-color: var(--highlight-bg); border-radius: 5px; color: var(--highlight-color); overflow-wrap: normal;">
</pre>
</pre>
Login to add comment