I am trying to crate a surface plot of a pandas DataFrame using cufflinks.
I would like to have customized axes titles (title_1
,title_2
and title_3
) and a plot title with a math symbol. However the plot I get does not display my axes titles and in the plot title I only see the math symbol but not "My title with ". Why it does not work and how to fix it?
I am working in a Jupyter notebook.
import cufflinks as cf
cf.set_config_file(offline=True, dimensions=((1000,600)), theme = 'white')
pd.DataFrame([(1,2),(3,4)]).iplot(kind = 'surface', xTitle = "title_1", \
yTitle = "title_2" , zTitle = "title_3",\
title = r"My title with $\sigma$")
Since
iplot
returns a Plotly figure, you can provide a layout object, as follow (refer to Plotly documentation to understand how layout works):As for why in the title you only see the rendered sigma and not the text, that is a bug with Plotly. Nothing we can do about it, for now.