Hi,
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
df.iplot(kind=‘bar’, filename=‘cufflinks/grouped-bar-chart’)
I want to have the x-axis and y-axis title to be in Times New Roman. Could anyone suggest?
Thank you.
Hi,
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’)
@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.
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