Space of a muser

Insight

Enjoy life, relish the moment!


  1. Plot heatmap with side color indicating the class of variables

    Sometimes, we need to make heatmaps for the matrix data with class information of categorical variables. In this case, we may want to use side color to mark the classes. Since neither matplotlib nor s …

    于  Python, heatmap, seaborn, sidecolor 继续阅读

  2. Some useful tips for pandas

    Select or groupby one column in pandas datafram with multi-level index To select one column in a datafram with multi-level index, you can use a tuple containing the names of the column in different …

    于  Python, data process, pandas 继续阅读

  3. Data visualization with Python

    最近经常用Python画柱状图和heatmap,一般需要存储为矢量图的PDF文件,方便后期编辑。 这里面有些需要注意的地方,记录如下:(另外我还发现在Jupyter中运行Python代码save的图像文件的字体有写异常,往往不是字母重叠就是距离太远,但是在Jupyter以外生成的图片正常。目前我还没有找到其中原因。) 关于pdf的图中启用Truetype字体方便编辑 1 plt.rcParam …

    于  Python, jupyter, matplotlib, pandas, seaborn 继续阅读

comments powered by Disqus