
Однако следующие рендеринги: щелкните правой кнопкой мыши поле вывода > Этот кадр > Открыть кадр в новой вкладке

Я выполняю график следующим образом
Код: Выделить всё
import plotly.express as px
import plotly.io as pio
pio.renderers.default = 'iframe'
num_rows = 50
# Generate random data for the columns
genes = [f'gene_{i}' for i in range(1, num_rows + 1)]
values = np.random.rand(num_rows)
treatments = np.random.choice(['treatment_A', 'treatment_B'], num_rows)
# Create the DataFrame
long = pd.DataFrame({
'gene': genes,
'value': values,
'treatment': treatments
})
fig = px.box(
long, x='gene', y='value',
color='treatment'
)
fig.update_xaxes(showline=True, linewidth=2, linecolor='black', showgrid=False)
fig.update_layout(
plot_bgcolor='rgba(0,0,0,0)',
yaxis = dict( tickmode = 'linear', tick0 = 0, dtick = 2),
xaxis = dict( tickmode = 'linear', tick0 = 0, dtick = 1),
width=1200,
height=600)
fig.show()
Код: Выделить всё
iframe-connected
Заранее большое спасибо за помощь
Подробнее здесь: https://stackoverflow.com/questions/789 ... jupyterlab