0
$\begingroup$

I was wondering if I could have help with the rotation of the axis of my plot.

S[z] = 
 ListPlot[
   {{0.3451, 0}, 
    {3.61504, 14.5525503047423}, {6.43385, 28.1359640888397}, 
    {8.20271, 35.8693997314435}, {10.36884, 40.0596469567131}, 
    {12.70524, 40.7344299897916}, {14.6349, 49.3205653991629}, 
    {16.64968, 47.236883162213}, {18.57934, 53.6723782396654}, 
    {20.42387, 60.1963170848129}, {23.15755, 61.0961774098441}, 
    {25.49395, 67.8907159035738}, {27.74521, 66.7281232290898}, 
    {29.35326, 74.270969135446}, {30.72483, 69.3890375468614}, 
    {32.89096, 84.4267811980949}, {34.0166, 84.5491651221964}}, 
   Joined -> True]

data = 
  {{0.3451, 0}, 
   {3.61504, 14.5525503047423}, {6.43385, 28.1359640888397}, 
   {8.20271, 35.8693997314435}, {10.36884, 40.0596469567131}, 
   {12.70524, 40.7344299897916}, {14.6349, 49.3205653991629}, 
   {16.64968, 47.236883162213}, {18.57934, 53.6723782396654}, 
   {20.42387, 60.1963170848129}, {23.15755, 61.0961774098441}, 
   {25.49395, 67.8907159035738}, {27.74521, 66.7281232290898}, 
   {29.35326, 74.270969135446}, {30.72483, 69.3890375468614}, 
   {32.89096, 84.4267811980949}, {34.0166, 84.5491651221964}};

S = Interpolation[data];

Plot2525 = Plotmeasured = 
  Plot[S[z], {z, First[data][[1]], Last[data][[1]]}]
Labeled[
  Rotate[Show[Plot2525, PlotRange -> All ], 270 Degree], 
  {"Depth m", " Unit shaft friction (KPa)"}, 
  {Left, Top}, 
  RotateLabel -> True]

It needs to be rotated 90 degree.

$\endgroup$
0

1 Answer 1

2
$\begingroup$

Flip horizontal & vertical axes:

ListLinePlot[Reverse /@ data]

enter image description here

$\endgroup$
5
  • $\begingroup$ Dear Roman.... would you mind if answered me about rotate just the axis number $\endgroup$ Commented Apr 21, 2019 at 20:51
  • $\begingroup$ I don't mean flip or rotate the figure, just rotate the axis number... All of the respect $\endgroup$ Commented Apr 21, 2019 at 20:53
  • $\begingroup$ What is the "axis number"? Do you mean the tick labels? $\endgroup$
    – Roman
    Commented Apr 21, 2019 at 21:00
  • $\begingroup$ yes dear tick labels $\endgroup$ Commented Apr 21, 2019 at 21:05
  • 2
    $\begingroup$ Reverse[data, 2] works too. $\endgroup$
    – Greg Hurst
    Commented Apr 22, 2019 at 0:38

Not the answer you're looking for? Browse other questions tagged or ask your own question.