我有一打箱形圖在同一個陰謀,排列水平。我希望它們之間的間隔保持不變,所以在撥打plt.boxplot()
時我沒有設置positions
。matplotlib:設置xticklabels返回一些「幫助」輸出
對於每個箱線圖,我要上X軸相應標籤到有一定的價值。 我這樣做:
xtickNames = plt.setp(ax, xticklabels=[str(v) for v in values])
plt.setp(xtickNames)
它的工作原理,但我在屏幕上得到所有這些東西輸出:
agg_filter:未知阿爾法:浮動(0.0透明到1.0 不透明)動畫:[真|假]軸:一個 :類:
~matplotlib.axes.Axes
實例的backgroundColor: 任何matplotlib顏色BBOX:矩形丙字典
clip_box:一個:類:matplotlib.transforms.Bbox
實例
clip_on:[真|假] clip_path:[ (:class:~matplotlib.path.Path
,
:class:~matplotlib.transforms.Transform
)|
:class:~matplotlib.patches.Patch
|無]顏色:任何 matplotlib顏色包含:可調用函數
family或fontfamily或fontname或name:[FONTNAME | 'serif'| 'sans-serif'| '草書'| '幻想'| '等寬'] 圖:一個:類:matplotlib.figure.Figure
實例
fontproperties或font_properties:一個 :類:matplotlib.font_manager.FontProperties
實例
GID:一個ID串的HorizontalAlignment或公頃: '中心' | 'right'| 'left']標籤:字符串或任何可打印的 '%s'轉換。 linespacing:float(字體大小的倍數) lod:[True |錯誤]多重對齊:['left'| 'right'| 'center'] path_effects:unknown picker: [None | float | boolean | callable] position:(x,y)
rasterized:[True | False |無]旋轉:[角度爲 度| '垂直'| 'horizontal'] rotation_mode: 未知尺寸或字體大小:[size in points | 'xx-small'| 'x-small'| 'small'| 'medium'| '大'| 'x-large'| 'xx-large'] sketch_params:未知捕捉:未知
拉伸或fontstretch:[範圍爲0-1000的數值| 'ultra-condensed'| 'extra-condensed'| '濃縮' | '半精簡'| '正常'| '半擴展'| 'expanded'| 'extra-expanded'| 'ultra-expanded']
style or fontstyle:['normal'| 'italic'| 'oblique']
text:字符串或任何可打印'%s'轉換的字符串。
變換:類:~matplotlib.transforms.Transform
實例
網址:URL字符串變體或fontvariant: '正常' | 「小型股」] verticalalignment或VA或毫安:「中心」 | 'top'| 'bottom'| 'baseline'] visible:[True |假]
重量或fontWeight設置:[在0-1000範圍內的數值| 'ultralight' | 'light'| '正常'| 'regular'| '書'| 'medium' | '羅馬'| 'semibold'| 'demibold'| 'demi'| 'bold'| '重'| 'extra bold'| '黑']
X:浮法Y:浮動ZORDER:任何數量的
出了什麼問題?
因此,我甚至不需要保存到第一行的輸出變量,對不對? –