arnoutaertgeerts / python-highcharts

Use highchart.js to make plots in Python and IPython notebooks
http://nbviewer.ipython.org/github/arnoutaertgeerts/python-highcharts/blob/master/Tutorial.ipynb
Other
134 stars 31 forks source link

Graph cropped when saved #24

Open damienpicard opened 9 years ago

damienpicard commented 9 years ago

My graphs are systemmatically cropped when I saved then in any other format than .svg:

chart

matsvandecavey commented 8 years ago

The graphs are always cropped with the same ratio if you save to .png as far as I know. However, you can easily change the setting for the height of the graph to change the size they are cropped from. you can change this in the default settings (apply for all plots):

charts.default_options.update(dict(height=600))

or just add the option to the options when you plot the graph:

pd.plot(series, options=dict(height=600))

An interesting side note when you are making graphs for exporting is that you can remove some of the data exploring visualizations. Espacially useful for timeseries plots charts.plot(series,stock=True):

no_stock_opts = dict(
                rangeSelector=dict(enabled=False), 
                navigator=dict(enabled=False), 
                scrollbar=dict(enabled=False))
charts.default_options.update(no_stock_opts)