Telegram Group & Telegram Channel
تغییر جهت لیبل نمودار x ها در Matplotlib
یکی از سوالاتی که خیلی پرسیده شده است این است که چگونه جهت لیبل های نمودار x را تغییر دهیم. این موضوع زمانی اهمیت پیدا می کند که تعداد داده ها خیلی زیاد هستند و نمودار x ها عملا غیر قابل استفاده می شود. برای این موضوع 5 روش وجود دارد که برای نمونه یکی از آنها را در تصویر این پست قرار می دهم.

# Option 1
plt.xticks(rotation=30, ha='right')

# Option 2
plt.draw()
ax.set_xticklabels(ax.get_xticklabels(), rotation=30, ha='right')

# Option 3
for label in ax.get_xticklabels():
label.set_rotation(30)
label.set_ha('right')

# Option 4
ax.tick_params(axis='x', labelrotation=30)
# Eventually, this shouldn't be needed and an ha argument should
# be available for the above.
plt.xticks(ha='right')

# Option 5
plt.setp(ax.get_xticklabels(), rotation=30, ha='right')

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

پایتون برای مالی در تلگرام
https://www.tg-me.com/joinchat-AAAAAFGMkouqbsb86Vfzug



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

تغییر جهت لیبل نمودار x ها در Matplotlib
یکی از سوالاتی که خیلی پرسیده شده است این است که چگونه جهت لیبل های نمودار x را تغییر دهیم. این موضوع زمانی اهمیت پیدا می کند که تعداد داده ها خیلی زیاد هستند و نمودار x ها عملا غیر قابل استفاده می شود. برای این موضوع 5 روش وجود دارد که برای نمونه یکی از آنها را در تصویر این پست قرار می دهم.

# Option 1
plt.xticks(rotation=30, ha='right')

# Option 2
plt.draw()
ax.set_xticklabels(ax.get_xticklabels(), rotation=30, ha='right')

# Option 3
for label in ax.get_xticklabels():
label.set_rotation(30)
label.set_ha('right')

# Option 4
ax.tick_params(axis='x', labelrotation=30)
# Eventually, this shouldn't be needed and an ha argument should
# be available for the above.
plt.xticks(ha='right')

# Option 5
plt.setp(ax.get_xticklabels(), rotation=30, ha='right')

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

پایتون برای مالی در تلگرام
https://www.tg-me.com/joinchat-AAAAAFGMkouqbsb86Vfzug

BY Python4Finance




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

View MORE
Open in Telegram


Python4Finance Telegram | DID YOU KNOW?

Date: |

Telegram Be The Next Best SPAC

I have no inside knowledge of a potential stock listing of the popular anti-Whatsapp messaging app, Telegram. But I know this much, judging by most people I talk to, especially crypto investors, if Telegram ever went public, people would gobble it up. I know I would. I’m waiting for it. So is Sergei Sergienko, who claims he owns $800,000 of Telegram’s pre-initial coin offering (ICO) tokens. “If Telegram does a SPAC IPO, there would be demand for this issue. It would probably outstrip the interest we saw during the ICO. Why? Because as of right now Telegram looks like a liberal application that can accept anyone - right after WhatsApp and others have turn on the censorship,” he says.

Python4Finance from ua


Telegram Python4Finance
FROM USA