Anonymous
Заголовок гистограммы в фасетной гистограмме в графическом выражении содержит "="
Сообщение
Anonymous » 27 фев 2026, 21:46
Без лишних слов:
Код: Выделить всё
import plotly.express as px
import pandas as pd
df = pd.DataFrame({
"country": ['Poland', 'Poland', 'Poland',
'Germany', 'Germany', 'Germany',
'France', 'France', 'France'],
"city": ['Warsaw', 'Krakow', 'Gdansk',
'Berlin', 'Munich', 'Nuremberg',
'Paris', 'Marseille', 'Brest'],
"population": [1863000, 803000, 470000,
3769000, 1488000, 518000,
2103000, 877000, 140000]
})
px.histogram(df,
x="population",
facet_col="country",
labels={"population": "Population"},
title="Areas per country")
выдает такую гистограмму
Как избавиться от "country=" в заголовках?
Подробнее здесь:
https://stackoverflow.com/questions/798 ... ains-label
1772217981
Anonymous
Без лишних слов: [code]import plotly.express as px import pandas as pd df = pd.DataFrame({ "country": ['Poland', 'Poland', 'Poland', 'Germany', 'Germany', 'Germany', 'France', 'France', 'France'], "city": ['Warsaw', 'Krakow', 'Gdansk', 'Berlin', 'Munich', 'Nuremberg', 'Paris', 'Marseille', 'Brest'], "population": [1863000, 803000, 470000, 3769000, 1488000, 518000, 2103000, 877000, 140000] }) px.histogram(df, x="population", facet_col="country", labels={"population": "Population"}, title="Areas per country") [/code] выдает такую гистограмму Как избавиться от "country=" в заголовках? Подробнее здесь: [url]https://stackoverflow.com/questions/79898053/histogram-title-in-facetted-histogram-in-plotly-express-contains-label[/url]