Is it possible to have an axis' maximum value in the middle?

1 次查看(过去 30 天)
Is it possible to have an x-axis with its maximum value in the middle? For example if I want to plot the speed of a car driving along a 100m track, and then turn around, covering the same distance. I would like to plot the speed against the full 200 m race, but with the x-axis displaying its displacement from the starting point. Thus, going from 0-100-0, with the axis effectively 200 m long and not just 100 m with the graph also "turning around" after 100m. Hope this makes sense?

采纳的回答

PaFlo
PaFlo 2019-9-10
Hey EJ.
If I understood your question correctly, you could simply change the xticklabels of your x-axis.
Best.
  1 个评论
John D'Errico
John D'Errico 2019-9-10
The point being that you don't plot distance on the x axis. You plot speed against TIME.
Then feel free to set the axis tickmarks to be whatever you want them to show as.
Since time is increasing over the entire event, you have no problems.

请先登录,再进行评论。

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Line Plots 的更多信息

标签

Community Treasure Hunt

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

Start Hunting!

Translated by