Seaborn တွင် နောက်ခံအရောင်ပြောင်းနည်း
Python ရှိ Seaborn ကွက်ကွက်တစ်ခု၏ နောက်ခံအရောင်ကို ပြောင်းလဲရန် အောက်ပါအခြေခံ syntax ကို သင်အသုံးပြုနိုင်သည်-
sns. set (rc={' axes.facecolor':'lightblue ', ' figure.facecolor':'lightgreen '})
အောက်ဖော်ပြပါ ဥပမာသည် ဤ syntax ကို လက်တွေ့တွင် မည်သို့အသုံးပြုရမည်ကို ပြသထားသည်။
ဥပမာ- Seaborn တွင် နောက်ခံအရောင်ပြောင်းခြင်း။
အောက်ဖော်ပြပါကုဒ်သည် ကွက်လပ်အတွင်းရှိ အပြာနုရောင်နောက်ခံနှင့် ကွက်လပ်အပြင်ဘက်တွင် အစိမ်းဖျော့ဖျော့နောက်ခံဖြင့် Seaborn တွင် point cloud တစ်ခုကို ဖန်တီးနည်းကို ပြသသည်-
import seaborn as sns
import matplotlib. pyplot as plt
#define data
x = [1, 2, 2, 3, 5, 6, 6, 7, 9, 10, 12, 13]
y = [8, 8, 10, 12, 13, 15, 18, 15, 19, 22, 24, 29]
#define seaborn background colors
sns. set (rc={' axes.facecolor':'lightblue ', ' figure.facecolor':'lightgreen '})
#create seaborn scatterplot
sns. scatterplot (x,y)
လမ်းကြောင်းအတွင်းရှိ နောက်ခံအရောင်သည် အပြာဖျော့ဖျော့ဖြစ်ပြီး၊ ကျွန်ုပ်တို့သတ်မှတ်ထားသည့်အတိုင်း လမ်းကြောင်းအပြင်ဘက် နောက်ခံအရောင်သည် အစိမ်းဖျော့ဖျော့ဖြစ်သည်။
ကိစ္စအများစုတွင်၊ လမ်းကြောင်းအတွင်းနှင့်အပြင်တွင်တူညီသောအရောင်ကိုအသုံးပြုခြင်းသည် ပို၍ အဖြစ်များသည်။
ဥပမာအားဖြင့်၊ လမ်းကြောင်းအတွင်းနှင့် အပြင်ဘက်တွင် နောက်ခံအရောင်ကို အပြာနုရောင်ဖြစ်အောင် ပြုလုပ်ရန် အောက်ပါကုဒ်ကို အသုံးပြုနိုင်သည်။
import seaborn as sns
import matplotlib. pyplot as plt
#define data
x = [1, 2, 2, 3, 5, 6, 6, 7, 9, 10, 12, 13]
y = [8, 8, 10, 12, 13, 15, 18, 15, 19, 22, 24, 29]
#define seaborn background colors
sns. set (rc={' axes.facecolor':'lightblue ', ' figure.facecolor':'lightblue '})
#create seaborn scatterplot
sns. scatterplot (x,y)
တိကျသောအရောင်များကို သတ်မှတ်ရန် ကျွန်ုပ်တို့သည် ဆယ်ဂဏန်းမျှသော အရောင်ကုဒ်များကို အသုံးပြုနိုင်ကြောင်း သတိပြုပါ။
ဥပမာအားဖြင့်၊ ကွက်လပ်အတွင်းရှိ နောက်ခံအရောင်အဖြစ် #33FFA2 ကို သတ်မှတ်ရန် အောက်ပါကုဒ်ကို အသုံးပြုနိုင်ပါသည်။
import seaborn as sns
import matplotlib. pyplot as plt
#define data
x = [1, 2, 2, 3, 5, 6, 6, 7, 9, 10, 12, 13]
y = [8, 8, 10, 12, 13, 15, 18, 15, 19, 22, 24, 29]
#define seaborn background colors
sns. set (rc={' axes.facecolor':'#33FFA2 ', ' figure.facecolor':'lightgrey '})
#create seaborn scatterplot
sns. scatterplot (x,y)
ထပ်လောင်းအရင်းအမြစ်များ
အောက်ဖော်ပြပါ သင်ခန်းစာများသည် Seaborn တွင် အခြားသော ဘုံလုပ်ဆောင်ချက်များကို မည်သို့လုပ်ဆောင်ရမည်ကို ရှင်းပြသည်-
Seaborn ဇာတ်ကွက်၏ ပုံအရွယ်အစားကို ချိန်ညှိနည်း
Seaborn ကွက်တွင် ဝင်ရိုးအညွှန်းများကို မည်သို့ပြောင်းရမည်နည်း။
Seaborn မြေကွက်များတွင် မှင်အရေအတွက်ကို ချိန်ညှိနည်း