| jupyter |
| jupytext |
kernelspec |
language_info |
plotly |
| notebook_metadata_filter |
text_representation |
all |
| extension |
format_name |
format_version |
jupytext_version |
.md |
markdown |
1.1 |
1.1.1 |
|
|
| display_name |
language |
name |
Python 3 |
python |
python3 |
|
| codemirror_mode |
file_extension |
mimetype |
name |
nbconvert_exporter |
pygments_lexer |
version |
|
.py |
text/x-python |
python |
python |
ipython3 |
3.6.8 |
|
| description |
display_as |
language |
layout |
name |
order |
permalink |
redirect_from |
thumbnail |
How to set the global font, title, legend-entries, and axis-titles in python. |
file_settings |
python |
base |
Setting the Font, Title, Legend Entries, and Axis Titles |
11 |
python/figure-labels/ |
python/font/ |
thumbnail/figure-labels.png |
|
|
import plotly.graph_objects as go
fig = go.Figure()
fig.add_trace(go.Scatter(
x=[0, 1, 2, 3, 4, 5, 6, 7, 8],
y=[0, 1, 2, 3, 4, 5, 6, 7, 8],
name="Name of Trace 1"
))
fig.add_trace(go.Scatter(
x=[0, 1, 2, 3, 4, 5, 6, 7, 8],
y=[1, 0, 3, 2, 5, 4, 7, 6, 8],
name="Name of Trace 2"
))
fig.update_layout(
title="Plot Title",
xaxis_title="x Axis Title",
yaxis_title="y Axis Title",
font=dict(
family="Courier New, monospace",
size=18,
color="#7f7f7f"
)
)
fig.show()
See https://plot.ly/python/reference/#layout for more information!