cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - Visit the PTCooler (the community lounge) to get to know your fellow community members and check out some of Dale's Friday Humor posts! X

Vertical Line in X-Y-Diagramm

SimonKohn
1-Newbie

Vertical Line in X-Y-Diagramm

Good day everyone,

If I plot a very simple funktion, like f(x)=x, and I want to display vertikal lines in the plot, for example at X=4, how is it done? Horizontal lines are no problem using f(x)=4 🙂

Best Regards

19 REPLIES 19
RichardJ
19-Tanzanite
(To:SimonKohn)

There's more than one way, but this approach is the most versatile.

MikeArmstrong
5-Regular Member
(To:SimonKohn)

Have a look below. There is another method using a pre-defined function - Lines which has been passed in the forum before. But if you only want a few lines this might be a simple solution.

Clipboard01.jpg

Mike

We can point a point on the plot so too (a broken line arrow):

http://twt.mpei.ac.ru/ochkov/Mathcad_12/4_09_2D_Regress_n_11.png

MikeArmstrong
5-Regular Member
(To:ValeryOchkov)

Nice example Valery,

Any chance of a worksheet?

Mike

http://communities.ptc.com/servlet/JiveServlet/showImage/2-149416-2532/bar_anim.gif

Mike Armstrong wrote:

Nice example

Yes

I use this tip on mye Web Reference books based on MAS for a pointing functions x -> f(x) (left break arrow) or f(x) -> (down break arrow).

One example:

http://twt.mpei.ac.ru/MCS/Worksheets/Turbine/PT-60-90/T-27b.xmcd

StuartBruff
23-Emerald II
(To:SimonKohn)

Simon Kohn wrote:

Good day everyone,

If I plot a very simple funktion, like f(x)=x, and I want to display vertikal lines in the plot, for example at X=4, how is it done? Horizontal lines are no problem using f(x)=4 🙂

Best Regards

In addition, you could use the built-in markers ... I've added an example of their use to Richard's worksheet.

Stuart

MikeArmstrong
5-Regular Member
(To:StuartBruff)

In addition, you could use the built-in markers ... I've added an example of their use to Richard's worksheet.

These can be used but they are limited as they you can only have two markers per axis.

Mike

http://communities.ptc.com/servlet/JiveServlet/showImage/2-149416-2532/bar_anim.gif

Stuart_Bruff wrote:

Simon Kohn wrote:

Good day everyone,

If I plot a very simple funktion, like f(x)=x, and I want to display vertikal lines in the plot, for example at X=4, how is it done? Horizontal lines are no problem using f(x)=4 🙂

Best Regards

In addition, you could use the built-in markers ...

Stuart

Do you know than in Mathcad Prime we can use in Plot markes only numbers without units and not variables and functions

Clearly a feature that must wait for Prime 2 or 3 or 4 or . . .

In Mathcad Prime 1.0, you can insert as many markers as you want on either axis, while in previous versions of Mathcad you are limited to 2 markers per axis.

You can insert variables or functions in markers in Mathcad Prime 1.0. They display as the value. You are correct, that you can't insert units in a marker in Mathcad Prime 1.0.

You can also choose the thickness, color, and line style of the marker line in Mathcad Prime 1.0, while in previous versions you can only select the color. I find it difficult to revise the markers in previous versions of Mathcad, without starting over. They are easy to edit and drag in Mathcad Prime 1.0.

MikeArmstrong
5-Regular Member
(To:mzeftel)

You can insert variables or functions in markers in Mathcad Prime 1.0. They display as the value. You are correct, that you can't insert units in a marker in Mathcad Prime 1.0.

You can also choose the thickness, color, and line style of the marker line in Mathcad Prime 1.0, while in previous versions you can only select the color. I find it difficult to revise the markers in previous versions of Mathcad, without starting over. They are easy to edit and drag in Mathcad Prime 1.0.

This is a nice feature and something which was needed

Mike

http://communities.ptc.com/servlet/JiveServlet/showImage/2-149416-2532/bar_anim.gif

Mona Zeftel wrote:

You can insert variables or functions in markers in Mathcad Prime 1.0. They display as the value.


Thanks!

As L(R)/m P/kg etc

Mona Zeftel wrote:

You can insert variables or functions in markers in Mathcad Prime 1.0. They display as the value. You are correct, that you can't insert units in a marker in Mathcad Prime 1.0.


THAT is a great feature! Displaying as a value is a significant improvement, being able to add prefix text would be icing on the cake!

RichardJ
19-Tanzanite
(To:f.kohlhepp)

THAT is a great feature! Displaying as a value is a significant improvement

Not really, because it's not an option, it's the only way to display it. If you want to display the variable name you can't. I believe this will change, so that it is an option, but right now it's not.

There is also a really annoying grey box that always appears around the number. Hopefully we will be able to make that go away too!

wayne
3-Visitor
(To:SimonKohn)

Simon,

Just as a hoirzontal line is y(x)=3, a vertical line is x(y)=3; the dependent and indepentent axis can be interchanged, Mathcad don't care.

(as Stuart, I used Richard's example)

@ Wayne:

Extend the vertical axis until 1 000 000 and your method won't work 😞

wayne
3-Visitor
(To:SimonKohn)

Simon,

Sorry, I did not realized you were working with the US budget deficite. Try using units of 1one trillion dollars.

Don't worry, it's the German one.

Thanks to all helping hands in this topic, but still fighting with extending the line during large vertical axis operations...

RichardJ
19-Tanzanite
(To:SimonKohn)

still fighting with extending the line during large vertical axis operations...

The vector method I showed works over any range. Wayn'e method will also work if you define y as a range variable before the plot.

Top Tags