# Rotate Ticks ( I was wondering if I could rotate the tick 90 degree without frame)

I was wondering if I could rotate the tick 90 degrees without a frame I appreciate any help because it is worth a lot

 data = {{0.3451, 0}, {3.61504, 12.6543915693412}, {6.43385,
24.4660557294258}, {8.20271, 31.1907823751683}, {10.36884,
34.8344756145331}, {12.70524, 35.421243469384}, {14.6349,
42.8874481731851}, {16.64968, 41.0755505758374}, {18.57934,
46.671633251883}, {20.42387, 52.3446235520112}, {23.15755,
53.1271107911688}, {25.49395, 59.0354051335424}, {27.74521,
58.0244549818172}, {29.35326, 64.583451422127}, {30.72483,
60.3382935190099}, {32.89096, 73.4145923461695}, {34.0166,
73.521013149736}}

S = Interpolation[data];

Data1 = {{0, 0}
, {1, 41.1557652072566}, {2, 26.7071660139355}, {3,
52.5076912302508}, {4, 54.8574199760621}, {5,
58.0812755530632}, {6, 18.7154799672259}, {7,
55.1908623688319}, {8, 51.5182209503713}, {9,
53.0136468565549}, {10, 33.50035387528139}, {11,
33.53258650156708}, {12, 33.56151636992248}, {13,
72.6412318965037}, {14, 65.2496396332273}, {15,
75.7039929579603}, {16, 75.5678903567905}, {17,
89.8171235423774}, {18, 48.893863309522}, {19,
69.0161541536314}, {20, 102.712926300251}, {21,
105.20412918517}, {22, 113.786293961958}, {23,
119.154942745288}, {24, 130.32846330578}, {25,
114.041282090499}, {26, 109.546865537661}, {27,
110.940798932485}, {28, 88.8075898694084}, {29,
110.894095083624}, {30, 107.191935220656}, {31,
85.3126374855899}, {32, 121.398367136963}, {33,
108.281340306189}, {34, 124.438872899984}, {35,
138.668283540471}, {36, 115.726426869181}}

GM = Interpolation[Data1];

Plotresshear2 =
Plot[S[z] + (0.00003974057058409937 E^(-0.07243264122733914 z) \
(-317.6971390528727 + 1. E^(0.14486528245467828 z))*GM[z]*1000*1/(
5.286*0.305)), {z, 25.595153556674596, 35.00},
AspectRatio -> 0.6, PlotStyle -> Orange, AxesOrigin -> {0, 0},
AxesStyle -> Directive[Black, 20], PlotStyle -> Thick,
Filling -> Axis, TicksStyle -> Directive["Label", 20],
LabelStyle -> {FontFamily -> "Times New Roman", 20, GrayLevel[0]},
ImageSize -> Large]

Labeled[Rotate[
Show[Plotresshear2, PlotRange -> Automatic, ImageResolution -> 500],
270 Degree ], {"Depth (m)", "  stresses (kPa)"}, {Left, Top},
LabelStyle -> {FontFamily -> "Times New Roman", 20, GrayLevel[0]},
RotateLabel -> True]


rotate the tick 90 degrees without frame to be parallel with the label thank you in advance

See if the following approaches give what you need:

1. Apply rotation to the graphics primitives in Plotresshear2 (instead of rotating Plotresshear2):
rotatedplot = MapAt[GeometricTransformation[#, RotationTransform[270 Degree]] &,
Plotresshear2, {1}];

plot = Show[rotatedplot, AspectRatio -> 1/.6,
ImageSize -> {300, Automatic}, PlotRange -> All,
Ticks -> {Automatic, ChartingScaledTicks["Reverse"][##] &}];

Labeled[plot, {"Depth (m)",  "stresses (kPa)"}, {Left, Top},
LabelStyle -> {FontFamily -> "Times New Roman", 20, GrayLevel[0]},
RotateLabel -> True, FrameMargins -> {{-50, 0}, {0, 0}}]


1. An alternative approach is to use ParametricPlot (instead of Plot) with the option ScalingFunctions -> {None, "Reverse"} to get the desired rotation directly. We need to use the two-parameter form of ParametricPlot to get the filling and one-parameter version to get the line and combine the two with Show:
pp1 = ParametricPlot[{v (S[z] + (0.00003974057058409937 E^(-0.07243264122733914 z)
(-317.6971390528727 + E^(0.14486528245467828 z))*GM[z]*1000*1/(5.286*0.305))), z},
{z, 25.595153556674596, 35.00}, {v, 0, 1},
BoundaryStyle -> None, PlotStyle -> Orange,
PlotRange -> All, AspectRatio -> 1/.6,
Frame -> False, AxesOrigin -> {0, 0},
AxesStyle -> Directive[Black, 20],
PlotStyle -> Thick, TicksStyle -> Directive["Label", 20],
LabelStyle -> {FontFamily -> "Times New Roman", 20, GrayLevel[0]},
ImageSize -> {300, Automatic},
ScalingFunctions -> {None, "Reverse"}];

pp2 = ParametricPlot[{S[z] + (0.00003974057058409937 E^(-0.07243264122733914 z)
(-317.6971390528727 + E^(0.14486528245467828 z))*GM[z]*1000*1/(5.286*0.305)), z},
{z, 25.595153556674596, 35.00},
PlotStyle -> Directive[Thick, Red],
ScalingFunctions -> {None, "Reverse"}];

Labeled[Show[pp1, pp2], {"Depth (m)",  "stresses (kPa)"}, {Left, Top},
LabelStyle -> {FontFamily -> "Times New Roman", 20, GrayLevel[0]},
RotateLabel -> True,   FrameMargins -> {{-50, 0}, {0, 0}}]


1. Yet another alternative is to have Frame -> True and to use FrameLabel to place the labels:
pp1b = ParametricPlot[{v (S[z] + (0.00003974057058409937 E^(-0.07243264122733914 z)
(-317.6971390528727 + E^(0.14486528245467828 z))* GM[z]*1000*1/(5.286*0.305))), z},
{z, 25.595153556674596, 35.00}, {v, 0, 1},
BoundaryStyle -> None, PlotStyle -> Orange,
PlotRange -> {All, {0, -40}}, AspectRatio -> 1/.6,
Frame -> True,
FrameTicks -> {{Automatic, Automatic},
{ChartingScaledFrameTicks[{Identity, Identity}][##] &, All}},
AxesOrigin -> {0, 0},
FrameLabel -> { {"Depth (m)", None}, {None,  "  stresses (kPa)"}},
FrameStyle -> Directive[Black, 20],
PlotStyle -> Thick, TicksStyle -> Directive["Label", 20],
LabelStyle -> {FontFamily -> "Times New Roman", 20,
GrayLevel[0]},
ImageSize -> {350, Automatic},
ScalingFunctions -> {None, "Reverse"}];

Show[pp1b, pp2]


1. Finally, you can Show Plotresshear2 using custom ticks with labels rotated by -270 Degree so that when Show[...] is rotated the labels appear aligned with the axes:
tickF = ChartingScaledTicks["Linear"][##] /.
{a_, b_Integer, c_, d_}:> {a, Rotate[ToString @ b, -270 Degree], c, d}&;

Labeled[Rotate[Show[Plotresshear2, ImageSize -> {500, Automatic},
PlotRange -> All, Ticks -> {tickF, tickF}], 270 Degree ],
{"Depth (m)", " stresses (kPa)"}, {Left, Top},
LabelStyle -> {FontFamily -> "Times New Roman", 20, GrayLevel[0]},
RotateLabel -> True]
`

• Thank you so much, it really works. Commented Aug 24, 2019 at 8:22