0
$\begingroup$

I have a plot of discrete data and I want to change the position of vertical axes.

In the code below there are two impulses. I want the vertical scale to be on the left of both not in between them. How can I do it?

qr24={{-81.1708, 1.97194, -1.54651, -88.6083, 81.1947}, {-124.959, 
         18.3265, -1.42517, -81.6565, 126.296}, {-217.652, 
        58.9893, -1.30613, -74.8357, 225.504}, {-459.395, 
        185.895, -1.18629, -67.9692, 495.581}, {-1125.39, 
       625.405, -1.06357, -60.938, 1287.49}, {-1040.22, 
       763.551, -0.937596, -53.7203, 1290.38}, {-360.549, 
       343.484, -0.809633, -46.3885, 497.972}, {-143.611, 
       176.941, -0.681792, -39.0638, 227.887}, {-68.0315, 
       109.502, -0.55592, -31.8519, 128.915}, {-35.1828, 
       76.1506, -0.432802, -24.7977, 83.8853}, {-18.4078, 
      57.07, -0.312013, -17.877, 59.9652}, {-8.76274, 
     45.0052, -0.192299, -11.0179, 45.8504}, {-2.6606, 
     36.8312, -0.0721124, -4.13174, 36.9272}, {112.444, -13.6613, 1.6917,
     96.9272, 113.27}, {192.085, -48.7464, 1.81932, 104.24, 
    198.174}, {404.785, -159.707, 1.94659, 111.532, 
    435.152}, {1092.01, -598.461, 2.07213, 118.724, 
    1245.25}, {1201., -866.153, 2.19561, 125.799, 
   1480.75}, {380.562, -352.432, 2.31784, 132.802, 
  518.687}, {143.684, -170.154, 2.44034, 139.821, 
  222.705}, {66.4104, -102.037, 2.56462, 146.942, 
  121.746}, {33.8176, -70.0082, 2.69159, 154.217, 
  77.7481}, {17.4032, -52.4374, 2.82115, 161.64, 
  55.2499}, {8.01082, -41.7748, 2.95213, 169.145, 
  42.536}, {2.05497, -34.8426, 3.08268, 176.625, 34.9031}};

tab24 = Table[{qr24[[n]][[4]], qr24[[n]][[5]]}, {n, Length[qr24]}];

p24 = ListLinePlot[tab24, PlotStyle -> {RGBColor[1, 0, 0]}]
$\endgroup$
2
  • 1
    $\begingroup$ Add AxesOrigin -> {Min@tab24[[All, 1]], 0}, but personally I'd go with Frame -> True, Axes -> False. $\endgroup$
    – corey979
    Feb 27, 2018 at 18:41
  • $\begingroup$ Thank you very much! $\endgroup$
    – Ghady
    Feb 27, 2018 at 18:51

1 Answer 1

2
$\begingroup$

This is to put the answer corey979 gave in a comment on record.

Specify the axes origin.

ListLinePlot[qr24[[All, {4, 5}]], PlotStyle -> Red, AxesOrigin -> {-100, 0}]

plot1

Put the plot in a frame and turn axed off.

ListLinePlot[qr24[[All, {4, 5}]], PlotStyle -> Red, Frame -> True, Axes -> False]

plot2

$\endgroup$

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