I am using Cufflinks for a simple bar plot. Just like the example given in https://plot.ly/ipython-notebooks/cufflinks/#bar-charts using the following command
I want to have the x-axis and y-axis title to be in Times New Roman. Could anyone suggest?
xaxis as follows:
font=dict(family='Times New Roman',
I am not getting it.
If I take this example :
df = pd.DataFrame(np.random.rand(10, 4), columns=[‘A’, ‘B’, ‘C’, ‘D’])
df.iplot(kind=‘bar’, barmode=‘stack’, filename=‘cufflinks/grouped-bar-chart’)
How to do the change that you suggested?
@priyankalaha What I posted refers to how to define xaxis title with Times New Roman font, via pure Plotly. I have no experience with cufflinks, but if you can update layout for a cufflinks figure you should set the font via layout update.
@priyankalaha, you can use this guide to apply the changes that @empet recommends.
Basically, you will save the figure cufflinks produces by using the
asFigure flag, apply the changes and then display the plot using py.iplot:
fig = df.iplot(..., asFigure=True)
fig.layout.xaxis.font.family = 'Times New Roman'
fig.layout.yaxis.font.family = 'Times New Roman'
plotly.plotly.iplot(fig) # use plotly.offline.iplot(fig) if you don't intend to send the chart to plot.ly