how to get graph only in the 1st quadrant, ie., only in the positive x and y axis?

7 views (last 30 days)
need graph on the + x and + y direction only

Answers (1)

KSSV
KSSV on 15 Oct 2017
You must know that in the first quadrant both x and y should be positive. So you need to take only positive values to plot in the first quadrant. Let x and y be your data.
% to plot only positive values
plot(abs(x),abs(y))
  1 Comment
Daniel
Daniel on 26 Jan 2018
This does not work. It does not only take the positive values it turns all values positive. If there is data that is below the x axis it'll flip up to the first quadrant. To change the scope of the plot you can use axis([xmin xmax ymin ymax]) RIGHT after plotting.

Sign in to comment.

Categories

Find more on Discrete Data Plots in Help Center and File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!