write base graph