Plot hist code