日韩性视频-久久久蜜桃-www中文字幕-在线中文字幕av-亚洲欧美一区二区三区四区-撸久久-香蕉视频一区-久久无码精品丰满人妻-国产高潮av-激情福利社-日韩av网址大全-国产精品久久999-日本五十路在线-性欧美在线-久久99精品波多结衣一区-男女午夜免费视频-黑人极品ⅴideos精品欧美棵-人人妻人人澡人人爽精品欧美一区-日韩一区在线看-欧美a级在线免费观看

歡迎訪問 生活随笔!

生活随笔

當前位置: 首頁 > 编程语言 > python >内容正文

python

python seaborn boxplot_python - 如何将文本框添加到Seaborn Boxplot? - 堆栈内存溢出

發布時間:2023/12/20 python 27 豆豆
生活随笔 收集整理的這篇文章主要介紹了 python seaborn boxplot_python - 如何将文本框添加到Seaborn Boxplot? - 堆栈内存溢出 小編覺得挺不錯的,現在分享給大家,幫大家做個參考.

我試圖在框圖中插入一個文本框,但是出了點問題。 讓我們先繪制箱線圖:

import pandas as pd

import matplotlib.pyplot as plt

import seaborn as sb

df_data = pd.read_hdf('data.h5', key=f'df_data')

##print(df_data)

fig, (ax1, ax2) = plt.subplots(1,

2,

gridspec_kw={'width_ratios': [3, 1]})

my_pal = {'PtP':'dodgerblue', 'T1':'salmon', 'T2':'salmon', 'E':'limegreen'}

sb.boxplot(data=df_data[['PtP', 'T1', 'T2']], ax=ax1, palette=my_pal)

sb.boxplot(data=df_data[['E']], ax=ax2, palette=my_pal)

posx = 1500

posy = 'T1'

##ax1.text(posx,

## posy,

## f'Average Impulse Interval: Over9000',

## bbox=dict(facecolor='wheat'))

ax1.set_ylim(0)

ax1.set_ylabel('Voltage / mV, Time / ns')

ax2.set_ylim(0)

ax2.set_ylabel('Energy / fJ')

fig.suptitle('Distribution')

plt.grid(axis='y')

plt.show()

現在,當我嘗試取消注釋時:

ax1.text(posx,

posy,

f'Average Impulse Interval: Over9000',

bbox=dict(facecolor='wheat'))

Matplotlib引發錯誤:

Exception in Tkinter callback

Traceback (most recent call last):

File "C:\Users\Artur\AppData\Local\Programs\Python\Python37\lib\site-packages\matplotlib\axis.py", line 1550, in convert_units

ret = self.converter.convert(x, self.units, self)

File "C:\Users\Artur\AppData\Local\Programs\Python\Python37\lib\site-packages\matplotlib\category.py", line 52, in convert

'Missing category information for StrCategoryConverter; '

ValueError: Missing category information for StrCategoryConverter; this might be caused by unintendedly mixing categorical and numeric data

The above exception was the direct cause of the following exception:

Traceback (most recent call last):

File "C:\Users\Artur\AppData\Local\Programs\Python\Python37\lib\tkinter\__init__.py", line 1705, in __call__

return self.func(*args)

File "C:\Users\Artur\AppData\Local\Programs\Python\Python37\lib\site-packages\matplotlib\backends\_backend_tk.py", line 259, in resize

self.draw()

File "C:\Users\Artur\AppData\Local\Programs\Python\Python37\lib\site-packages\matplotlib\backends\backend_tkagg.py", line 9, in draw

super(FigureCanvasTkAgg, self).draw()

File "C:\Users\Artur\AppData\Local\Programs\Python\Python37\lib\site-packages\matplotlib\backends\backend_agg.py", line 388, in draw

self.figure.draw(self.renderer)

File "C:\Users\Artur\AppData\Local\Programs\Python\Python37\lib\site-packages\matplotlib\artist.py", line 38, in draw_wrapper

return draw(artist, renderer, *args, **kwargs)

File "C:\Users\Artur\AppData\Local\Programs\Python\Python37\lib\site-packages\matplotlib\figure.py", line 1709, in draw

renderer, self, artists, self.suppressComposite)

File "C:\Users\Artur\AppData\Local\Programs\Python\Python37\lib\site-packages\matplotlib\image.py", line 135, in _draw_list_compositing_images

a.draw(renderer)

File "C:\Users\Artur\AppData\Local\Programs\Python\Python37\lib\site-packages\matplotlib\artist.py", line 38, in draw_wrapper

return draw(artist, renderer, *args, **kwargs)

File "C:\Users\Artur\AppData\Local\Programs\Python\Python37\lib\site-packages\matplotlib\axes\_base.py", line 2647, in draw

mimage._draw_list_compositing_images(renderer, self, artists)

File "C:\Users\Artur\AppData\Local\Programs\Python\Python37\lib\site-packages\matplotlib\image.py", line 135, in _draw_list_compositing_images

a.draw(renderer)

File "C:\Users\Artur\AppData\Local\Programs\Python\Python37\lib\site-packages\matplotlib\artist.py", line 38, in draw_wrapper

return draw(artist, renderer, *args, **kwargs)

File "C:\Users\Artur\AppData\Local\Programs\Python\Python37\lib\site-packages\matplotlib\text.py", line 670, in draw

bbox, info, descent = textobj._get_layout(renderer)

File "C:\Users\Artur\AppData\Local\Programs\Python\Python37\lib\site-packages\matplotlib\text.py", line 276, in _get_layout

key = self.get_prop_tup(renderer=renderer)

File "C:\Users\Artur\AppData\Local\Programs\Python\Python37\lib\site-packages\matplotlib\text.py", line 831, in get_prop_tup

x, y = self.get_unitless_position()

File "C:\Users\Artur\AppData\Local\Programs\Python\Python37\lib\site-packages\matplotlib\text.py", line 814, in get_unitless_position

y = float(self.convert_yunits(self._y))

File "C:\Users\Artur\AppData\Local\Programs\Python\Python37\lib\site-packages\matplotlib\artist.py", line 192, in convert_yunits

return ax.yaxis.convert_units(y)

File "C:\Users\Artur\AppData\Local\Programs\Python\Python37\lib\site-packages\matplotlib\axis.py", line 1553, in convert_units

f'units: {x!r}') from e

matplotlib.units.ConversionError: Failed to convert value(s) to axis units: 'T1'

Exception in Tkinter callback

Traceback (most recent call last):

File "C:\Users\Artur\AppData\Local\Programs\Python\Python37\lib\site-packages\matplotlib\axis.py", line 1550, in convert_units

ret = self.converter.convert(x, self.units, self)

File "C:\Users\Artur\AppData\Local\Programs\Python\Python37\lib\site-packages\matplotlib\category.py", line 52, in convert

'Missing category information for StrCategoryConverter; '

ValueError: Missing category information for StrCategoryConverter; this might be caused by unintendedly mixing categorical and numeric data

The above exception was the direct cause of the following exception:

Traceback (most recent call last):

File "C:\Users\Artur\AppData\Local\Programs\Python\Python37\lib\tkinter\__init__.py", line 1705, in __call__

return self.func(*args)

File "C:\Users\Artur\AppData\Local\Programs\Python\Python37\lib\tkinter\__init__.py", line 749, in callit

func(*args)

File "C:\Users\Artur\AppData\Local\Programs\Python\Python37\lib\site-packages\matplotlib\backends\_backend_tk.py", line 338, in idle_draw

self.draw()

File "C:\Users\Artur\AppData\Local\Programs\Python\Python37\lib\site-packages\matplotlib\backends\backend_tkagg.py", line 9, in draw

super(FigureCanvasTkAgg, self).draw()

File "C:\Users\Artur\AppData\Local\Programs\Python\Python37\lib\site-packages\matplotlib\backends\backend_agg.py", line 388, in draw

self.figure.draw(self.renderer)

File "C:\Users\Artur\AppData\Local\Programs\Python\Python37\lib\site-packages\matplotlib\artist.py", line 38, in draw_wrapper

return draw(artist, renderer, *args, **kwargs)

File "C:\Users\Artur\AppData\Local\Programs\Python\Python37\lib\site-packages\matplotlib\figure.py", line 1709, in draw

renderer, self, artists, self.suppressComposite)

File "C:\Users\Artur\AppData\Local\Programs\Python\Python37\lib\site-packages\matplotlib\image.py", line 135, in _draw_list_compositing_images

a.draw(renderer)

File "C:\Users\Artur\AppData\Local\Programs\Python\Python37\lib\site-packages\matplotlib\artist.py", line 38, in draw_wrapper

return draw(artist, renderer, *args, **kwargs)

File "C:\Users\Artur\AppData\Local\Programs\Python\Python37\lib\site-packages\matplotlib\axes\_base.py", line 2647, in draw

mimage._draw_list_compositing_images(renderer, self, artists)

File "C:\Users\Artur\AppData\Local\Programs\Python\Python37\lib\site-packages\matplotlib\image.py", line 135, in _draw_list_compositing_images

a.draw(renderer)

File "C:\Users\Artur\AppData\Local\Programs\Python\Python37\lib\site-packages\matplotlib\artist.py", line 38, in draw_wrapper

return draw(artist, renderer, *args, **kwargs)

File "C:\Users\Artur\AppData\Local\Programs\Python\Python37\lib\site-packages\matplotlib\text.py", line 670, in draw

bbox, info, descent = textobj._get_layout(renderer)

File "C:\Users\Artur\AppData\Local\Programs\Python\Python37\lib\site-packages\matplotlib\text.py", line 276, in _get_layout

key = self.get_prop_tup(renderer=renderer)

File "C:\Users\Artur\AppData\Local\Programs\Python\Python37\lib\site-packages\matplotlib\text.py", line 831, in get_prop_tup

x, y = self.get_unitless_position()

File "C:\Users\Artur\AppData\Local\Programs\Python\Python37\lib\site-packages\matplotlib\text.py", line 814, in get_unitless_position

y = float(self.convert_yunits(self._y))

File "C:\Users\Artur\AppData\Local\Programs\Python\Python37\lib\site-packages\matplotlib\artist.py", line 192, in convert_yunits

return ax.yaxis.convert_units(y)

File "C:\Users\Artur\AppData\Local\Programs\Python\Python37\lib\site-packages\matplotlib\axis.py", line 1553, in convert_units

f'units: {x!r}') from e

matplotlib.units.ConversionError: Failed to convert value(s) to axis units: 'T1'

我嘗試用整數或浮點數替換'T1' ,但這無濟于事。

不相關似乎我需要在此帖子中添加更多文本。 不要因為我在這里輸入的廢話而分心。

創作挑戰賽新人創作獎勵來咯,堅持創作打卡瓜分現金大獎

總結

以上是生活随笔為你收集整理的python seaborn boxplot_python - 如何将文本框添加到Seaborn Boxplot? - 堆栈内存溢出的全部內容,希望文章能夠幫你解決所遇到的問題。

如果覺得生活随笔網站內容還不錯,歡迎將生活随笔推薦給好友。

主站蜘蛛池模板: 青青操操 | 95视频在线 | 精品人妻在线视频 | 欧美另类视频在线观看 | 秋霞三区| 国产精品免| 五月天在线播放 | 天天干天天草 | 国内久久久久 | 全部孕妇毛片丰满孕妇孕交 | 精品国产黄色 | 色在线看 | 手机在线观看av | 五月天激情影院 | 国产激情视频一区二区 | 美女上床网站 | 草草网址 | 亚洲男人的天堂在线 | 久久久久蜜桃 | 超碰在线网站 | 我们2018在线观看免费版高清 | 色鬼久久 | 国产一及毛片 | 黄色大全免费看 | 秋霞影院午夜 | 美女脱光内衣内裤 | 麻豆传媒网页 | 国产网站在线免费观看 | 57pao成人国产永久免费视频 | 999精品视频 | 人人草人人爽 | 日韩中文字幕一区二区 | 国产片高清在线观看 | 影音先锋成人资源站 | 免费黄视频网站 | a毛片视频| 大尺度床戏揉捏胸视频 | 成人免费视频一区二区三区 | 农村搞破鞋视频大全 | 老司机午夜免费视频 | 欧美亚洲国产一区 | 黄色片在线免费看 | 绿帽单男 | 午夜色大片 | 伊人久操视频 | 欧美精品做受xxx性少妇 | 97国产在线播放 | 日韩中文字幕一区二区 | 手机av免费在线观看 | 捆绑无遮挡打光屁股调教女仆 | 男人av网站 | 精品熟女一区二区 | 96人xxxxxxxxx69 | 国产睡熟迷奷系列精品视频 | 日本人dh亚洲人ⅹxx | 日日做夜夜爽毛片麻豆 | 欧美射射射| 精品无码久久久久成人漫画 | 久草视频中文在线 | 午夜在线观看影院 | 性欧美8khd高清极品 | 国产成人在线视频免费观看 | 久久亚洲精品中文字幕 | 国产精品一区电影 | 国产精品国产三级国产专区51区 | 婷婷色一区二区三区 | 欧美少妇一区二区 | 人人妻人人澡人人爽人人欧美一区 | 亚洲国产电影在线观看 | 国内自拍欧美 | 台湾av在线播放 | 在线观看免费av网址 | 亚洲久久天堂 | 欧美挤奶吃奶水xxxxx | 亚洲女人毛茸茸 | 欧美成人免费网站 | 免费观看一区二区三区视频 | 黄色的网站在线观看 | 色香天天| 黄色大尺度视频 | 中文国语毛片高清视频 | 综合国产精品 | 日本泡妞视频 | 国产精品传媒在线观看 | 久久av色 | 欧美亚洲视频在线观看 | 羞羞羞网站 | 久操中文 | 欧美国产视频一区 | 日韩精品人妻中文字幕有码 | 国产高潮av | 亚洲一区二区三区四区视频 | 992tv在线成人免费观看 | 精品无码国产污污污免费网站 | 8090理论片午夜理伦片 | 日韩一级在线观看视频 | 亚洲人成人网 | 各处沟厕大尺度偷拍女厕嘘嘘 | 亚洲国产不卡 |