Rotating a plot?

前端 未结 3 2163
孤城傲影
孤城傲影 2021-02-19 21:40

I have obtained an x-y plot in Matlab of the sine curve and I wish to rotate this plot by 90 degrees counter clockwise. How do I do this?

3条回答
  •  臣服心动
    2021-02-19 21:58

    The best way is to use view([az,el]) that works also for 3d plots.

    1. plot your graph using surf, mesh, etc. and put the graph manually in the desired position using the interactive rotate 3d tool at the tool bar. You see at the left side bottom of the plot the values for the horizontal rotation (azimuth, az) and the vertical elevation (el).

    2. Note the values for az and el and use view([az,el]) to plot.

    (When choosing az and el manually it seems like it gives only 2d-plots since the parameters are to be set correctly. Values like [0,1], [0,1], ... normally not work.)

提交回复
热议问题