generate three graph