Skip to content Skip to sidebar Skip to footer

Setting Axis Scale In Matplotlib Contour Plot

I'm generating a contour plot in matplotlib based on output from an FEM program which gives nodal coordinates and their corresponding state parameters as follows: x = [x1,x2,x3,...

Solution 1:

You probably want to use

plt.gca().set_aspect("equal")

instead of plt.axis('equal'). The result would look like

enter image description here

You may then also play with the figure size and the margins, e.g.

plt.figure(figsize=(8,2))
# ...
plt.tight_layout()

would result in

enter image description here

Post a Comment for "Setting Axis Scale In Matplotlib Contour Plot"