Text Location

Altair Forum User
Altair Forum User
Altair Employee
edited October 2020 in Community Q&A

Hello,

 

In the script below, I created a plot with a simple text on it. 

 

clear all;
close all;
clc;
x=linspace(0,2*pi,200);
y=sin(x);
plot(x,y); hold on;
plot(pi/2,1,'o');
text(pi/2,1,'P1');

 

The axis range of the figure is defined automatically. When I want to plot another function on the same figure, but with a larger axis range, the text that I created initially moves. Please apply the rest of the code below to see it:

 

z=5*cos(x);
plot(x,z,'-r');
plot(pi,-5,'o');
text(pi,-5,'peak');

 

What can I do to prevent the text from moving?

 

Thank you

Berker

Tagged:

Answers

  • Priyanka_N
    Priyanka_N
    Altair Employee
    edited June 2018

    Hello Berker,

     

    This issue is rectified in 2018.1 build which will be released soon.

     

    Thank you

    Priyanka N