×
INTELLIGENT WORK FORUMS
FOR ENGINEERING PROFESSIONALS

Are you an
Engineering professional?
Join Eng-Tips Forums!
• Talk With Other Members
• Be Notified Of Responses
• Keyword Search
Favorite Forums
• Automated Signatures
• Best Of All, It's Free!

*Eng-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

(OP)
Can somebody tell me, I want to know if it is possible to use Mathcad to make a graph with two differents Y-axis values, namely, I want to show the variation of X values with two different set of Y-axis variables which have no relationship between, so I want to put one set of Y values at the left-side of the graph and the other set at the right-side.

This kind of graph is used in Soil Mechanics.

Replies continue below

Recommended for you

Mathcad graphs are pretty limited, that's one fo the reasons that it used to come with Axum.

My usual modus operandi is to calculate in Mathcad and plot in Excel.

TTFN

2
Hi Ortiz,

Sure, Mathcad graphs can do what you ask, you just have to be a little circumspect in how you set up your data structures.

You'll need to use arrays, so start out something like this:
(Note that I use := for : in Mathcad, .. for ;, [ for functional subscript and . for literal subscript)

N:=100 The number of values in your arrays
n:=0,1..N  Set up a range on n

Now, fill your two Y ranges in a linear manner like this:

y1.min:=-10
y1.max:=10

y1[n := ((y1.max-y1.min)/N)*n+y1.min

y2.min:=-1
y2.max:=1

y2[n := ((y2.max-y2.min)/N)*n+y2.min

Now, fill your x array however you wish.  Let's say you already have some function f that does the job.

x[n := f(y1[n),y2[n)

Then, plot a Mathcad graph, by typing
y1[n@x[n

You're halfway there, now click inside the graph directly after where the y1[n apprears, and type a comma. This will create a blank placeholder directly under y1[n for a second plot.  You may have to use the spacebar to get the cursor positioned exactly on the far right side of y1[n otherwise when you type the comma, it will try to add a second index dimension after the n for the y1 array. Type y2[n in the second plot placeholder and you are good to go!  You can have as many as 16 different plots on one Mathcad graph.  Notice that the graph is basically pairing up values from the y1 array with the x array and the y2 array with the x array.  So, you need to make sure that all of these arrays are the same size or it won't work.

Hope this helps!
mattman206

Hi again,

I just realized that it's easier to get a two-plot Mathcad graph by typing

y1[n,y2[n@x[n

instead of that last command right before the paragraph "You're halfway there".

HTH,
mattman206

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Eng-Tips Forums free from inappropriate posts.
The Eng-Tips staff will check this out and take appropriate action.

Close Box

Join Eng-Tips® Today!

Join your peers on the Internet's largest technical engineering professional community.
It's easy to join and it's free.

Here's Why Members Love Eng-Tips Forums:

• Talk To Other Members
• Notification Of Responses To Questions
• Favorite Forums One Click Access
• Keyword Search Of All Posts, And More...

Register now while it's still free!