Bokeh
Time series plotting using hvPlot
hvPlot, a component of PyViz ia a new interactive plotting tool, which is a wrapper of Bokeh. hvPlot is easy to customize plotting options. However, currently there are some drawbacks, such as difficulty in adjusting aspect ratio of graph area, which may be resolved in Bokeh 1.1, slow processing, and cumbersome in exporting high resolution PNG file, comparing to Matplotlib. Default time series plotting Suppose df is a pandas DataFrame having a time series index and columns of 'kion' and 'sped', which are actually a dataset of air temperature and wind speed at Chiba Observatory, Japan, provided by Japan Meteorological Agency. import hvplot.pandas df[['kion','sped']].hvplot() Customized plotting Now one column of […]
File output in Bokeh
Updated on September 23, 2020:There seems a bug in bokeh 2.2.1, in which png files do not contain whole of the graphic area when exporting to png from html. To avoid this error, use bokeh 1.4.0, which can be insalled with conda install -c pyviz bokeh==1.4.0 in a new conda virtual environment This article is targeted for Windows 10. Although Matplotlib is a conventional plotting tool in Python, Bokeh is a relatively new package that makes it easy to create interactive plots. Unfortunately, the image output for pasting into PowerPoint or Word is low resolution by default, and it is necessary to enhance the resolution by setting the value of […]