Telegram Group & Telegram Channel
رسم نمودارهای مثبت و منفی در Matplotlib
در ادامه یک نمونه کد برای رسم نمودارهایی که مقادیر مثبت و منفی با رنگ های مختلف نمایش داده شده اند با استفاده از کتابخانه matplotlib قرار داده شده است.

import matplotlib.pyplot as plt
x = range(7)
data_pos = [1,0,3,0,6,2,0]
data_neg = [0,-2,0,-6,0,0,-2]

plt.bar(x, data_pos, width=1, color='b')
plt.bar(x, data_neg, width=1, color='r')
plt.show()

#نمودار
#پایتون مالی
#matplotlib

@python4finance



tg-me.com/python4finance/465
Create:
Last Update:

رسم نمودارهای مثبت و منفی در Matplotlib
در ادامه یک نمونه کد برای رسم نمودارهایی که مقادیر مثبت و منفی با رنگ های مختلف نمایش داده شده اند با استفاده از کتابخانه matplotlib قرار داده شده است.

import matplotlib.pyplot as plt
x = range(7)
data_pos = [1,0,3,0,6,2,0]
data_neg = [0,-2,0,-6,0,0,-2]

plt.bar(x, data_pos, width=1, color='b')
plt.bar(x, data_neg, width=1, color='r')
plt.show()

#نمودار
#پایتون مالی
#matplotlib

@python4finance

BY Python4Finance




Share with your friend now:
tg-me.com/python4finance/465

View MORE
Open in Telegram


Python4Finance Telegram | DID YOU KNOW?

Date: |

NEWS: Telegram supports Facetime video calls NOW!

Secure video calling is in high demand. As an alternative to Zoom, many people are using end-to-end encrypted apps such as WhatsApp, FaceTime or Signal to speak to friends and family face-to-face since coronavirus lockdowns started to take place across the world. There’s another option—secure communications app Telegram just added video calling to its feature set, available on both iOS and Android. The new feature is also super secure—like Signal and WhatsApp and unlike Zoom (yet), video calls will be end-to-end encrypted.

Python4Finance from tw


Telegram Python4Finance
FROM USA