seaborn

    2熱度

    1回答

    我在Jupyter筆記本上寫代碼,並且有一個Seaborn facetgrid,我想要4列和3行。每個小區都是針對10個國家/地區列表中的不同國家/地區。由於總共有12個網格,最後兩個網格是空的,有沒有辦法擺脫最後兩個網格?製作尺寸爲5 x 2的解決方案不是一種選擇,因爲很難看出何時將許多地塊拼湊在一起。 代碼: ucb_w_reindex_age = ucb_w_reindex[np.isfin

    1熱度

    1回答

    我有一個數據集(有點)所示: f1 f2 f3 value 4 2 3 0.927252 1 3 0 0.153415 0 1 1 0.928820 1 0 4 0.933250 0 4 3 0.397307 ... 欲產生Seaborn PairGrid與stripplot s的抖動或swarmplot S表示每對特徵f1,f2和f3 ,並使用value作爲hue。

    0熱度

    1回答

    我想要將貸款狀態作爲性別和列作爲自僱人物來使用。 g=sns.FacetGrid(train,row='Gender',col='Self_Employed',size=2.2,aspect=1.6) g.map(plt.hist,'Loan_Status') g.add_legend() plt.show() 錯誤是 - 類型錯誤:不能連接「STR」和「浮動」對象

    0熱度

    1回答

    我創建了分組Pandas Dataframe中某些數據的散點圖(請參閱下面的代碼)。我無法弄清楚如何將標記類型設置爲打開/未填充的圓。我在其他帖子中找不到的參數都有效(ms,markeredgewidth,markerfacecolor,facecolor,edgewidth - 全部列爲「未知屬性」)。有沒有我缺少的參數?我正在使用matplotlib和seaborn。 for key, gro

    0熱度

    1回答

    這是我的代碼。 我想添加錯誤欄作爲使用seaborn軟件包的數據標準差。但我得到了類型錯誤。 import pandas as pd %matplotlib inline import seaborn as sns import matplotlib.pyplot as plt example = pd.DataFrame({"value": [2,3,4

    2熱度

    1回答

    我試圖用seaborn繪製圖表 sns.lmplot(x="when_start", y="how_long",hue= 'state', data=apps_pd.loc[(apps_pd['user'] == 'xavi')],lowess=True); 凡apps_pd是一個數據幀。和在apps_pd的Fileds [ 'when_start']是INT像149996385

    0熱度

    1回答

    刪除曲線這是一個Seaborn JointPlot 我想要做的三件事情來得到它顯示像輸出的圖像 卸下散射部趨勢線 顯示在直方圖的條不同分界 卸下曲線在直方圖上。 添加'edgecolor'只會劃分散點圖上的圓圈,而不是直方圖。 任何幫助表示讚賞。

    -2熱度

    1回答

    我需要使用FaceGrid boxplot來繪製以下數據框,以便網格的每一行對應於特定的一週,由k_week給出,列是數據幀的列(Sensitivity ,Specificity等)。每個箱線圖應包含6種型號( '西格', 'MRM', '平均',等等) 這裏是單行的例子(我成功地得到它): 現在我需要使用FaceGrid在單個圖上獲取這6行。 數據框: df.groupby('k_week').

    1熱度

    1回答

    我使用seaborn.clustermap生成了一個clustermap。我想表現的row_colors選項突出一些集羣但是這是我得到的結果是: clustermap with missing row_colors 在這裏你可以找到我的代碼: pal = sns.light_palette('red', np.unique(labels).size) lut = dict(zip(np.uniq

    2熱度

    2回答

    我想用matplotlib和seaborn創建一個平滑的折線圖。 這是我的數據幀df: hour direction hourly_avg_count 0 1 20 1 1 22 2 1 21 3 1 21 .. ... ... 24 1 15 0 2 24 1 2 28 ... ... ... 折線圖應該包含兩行,一個用