generating figure tex