Skip to main content
1-Visitor
June 20, 2014
Question

Equal axes in contour plots

  • June 20, 2014
  • 11 replies
  • 3185 views

Hello,

Is there a way to make the axes equal in a contour plot? I'd like to plot some data as a contour plot but the kept the scales equal so it is easy to interpret.

Is this possible?

Thanks

George

11 replies

Werner_E
25-Diamond I
June 20, 2014

There is no option to do this automatically for you like in the 2D plot. But you can change the range to be plotted either on the Quickplot tab in the 3D-Plot-Format menu or via CreateMesh() (whatever you use). On the Axes tab you have the option to turn Auto Scale off and scale the plot yourself the way you like.

20.06.png

1-Visitor
June 20, 2014

If you provide some typical data I'm sure a simple program could be developed to scale the axis.

Werner_E
25-Diamond I
June 20, 2014

First we should at least know what version of Mathcad is in use.

1-Visitor
June 20, 2014

True

gellwood1-VisitorAuthor
1-Visitor
June 21, 2014

Hello, thank you for the responses. I'm using Mathcad 15.

I've tried unticking the autoscale button. If I make the scales the same size by setting the minimum and maximum will that do what I want? I thought I had to control the size of the plot window as well, because I could set the axes and then manually drag the window into a different size.

My end goal is to make some scale images of the data that I can superimpose on some geometry.

Thanks

George

1-Visitor
June 21, 2014

Please provide a worksheet for us to work with.

gellwood1-VisitorAuthor
1-Visitor
June 21, 2014

Thanks for the responses, I'll post the work sheet when I get back to work on Monday.

I've created the contour plot by creating three vectors by reading in data files for each vector. The x values are in the first vector, the y values are in the second vector and the z values are in the third vector. I then create a plot of (x,y,z)

Werner_E
25-Diamond I
June 21, 2014

Just three vectors? That would define just a number of points in 3D, maybe a curve, but sure not a surface you could plot a countour plot of!

Its just like you provide a bunch of points in 2D but no order to connect them. You can draw the point, but no curve. You have to provide the antecessor and the successor for every point to be able to draw a curve.

Similar in 3D: you would need some kind of 2D-order, define the four neighbours for every point in space. In other words you have to provide some kind of grid. Somethink like the data structure created by CreateMesh(). Thats a vector consisting of three matrices (2D!), one for every coordinate (x,y,z).

gellwood1-VisitorAuthor
1-Visitor
June 21, 2014

The way I've done it is to create three vectors, all the same length. x1 to xn, y1 to yn and z1 to zn.

The at point (x1,y1) z1 is the variable I wish to produce a contour map.This is how I've defined the grid of points.

There are probably better ways to do it but my data is already in this format and the contour plot appears as I would expect it to.

Werner_E
25-Diamond I
June 21, 2014

and the contour plot appears as I would expect it to.

I may look similar to what you expect, but I doubt its correct. Make the contour plot a surface plot and then plot the same three vectors as scatter plot (this time you see the single points). You will notice that the points are not on the surface plotted. So the surface probably is not the exact surface you want the contourplot be plotted of.

We had a similar probleme here a while ago http://communities.ptc.com/message/244950#244950

You might find that thread useful for your problem, too.