xiaodong BSkeleton plot/histogram code