Question: `RandomInteger[3,3]` produces a vector of length-3 randomly. But it counts index from 1. I need a vector, index of which starts from 0. Because of this, when plotting it, my x-axis starts from 1. Look at the following.

```
ListPlot[RandomInteger[3, 3]]

```

So I've searched HELP about this, and I found the option about `AxesOrigin`. I tried out the following.

```
ListPlot[RandomInteger[3, 3], AxesOrigin -> {1, 0}]

```

Look at the values of the axis. It's just shifting the axis without adjusting index of the vector. It is starting from 1 still.

**How can I count my vectors from the index of 0?**

Answer: 
**------- Edit: @@rm-rf comment -------**

@@rm-rf suggested a very good idea - this is basically an option to `ListPlot` which I missed - `DataRange`. In simplest terms this works:

```
ListLinePlot[RandomInteger[3, 3], DataRange -> {0, 2}] 

```

**------- older answer -------**

Whenever `ListPlot` makes graphics from a simplest list it interprets it as y-data and indexes x-data automatically starting from 1. But if you give it your own index - it will take it in account. You need to produce pairs of numbers where 1st in a pair number is your index. You can do it a number of ways, - a few equivalent examples:

```
data = Transpose[{Range[0, 2], RandomInteger[3, 3]}]

```

> 
> {{0, 3}, {1, 3}, {2, 3}}
> 
> 
> 

```
data = Table[{k, RandomInteger[3]}, {k, 0, 2}]

```

> 
> {{0, 1}, {1, 1}, {2, 1}}
> 
> 
> 

```
data = {#, RandomInteger[3]} & /@ Range[0, 2]

```

> 
> {{0, 3}, {1, 1}, {2, 1}}
> 
> 
> 

It now will work:

```
ListLinePlot[data, AxesOrigin -> {0, 0}, 
  Mesh -> All, MeshStyle -> Directive[Red, PointSize[Large]]]

```

![enter image description here](https://i.stack.imgur.com/bDnXb.png)
To achieve the result you want, you need to control both the `PlotRange` and the `AxesOrigin`. `PlotRange` controls which part of the x and y axis are display and `AxesOrigin` controls where the axes are placed.

```
ListLinePlot[RandomInteger[3, 3], 
              PlotRange -> {{0.9, 3.1}, {0, 3.1}},
              AxesOrigin -> {1, 0}, 
              PlotMarkers->Automatic]

```

> 
> ![Mathematica graphics](https://i.stack.imgur.com/f8LzK.png)
> 
> 
> 

One point to note is that you are **not** changing the indices of the random vector you have created.

Mathematica stores data in lists whose indices start at 1, what you are modifying here is the visual appearance of the plot of that data.

The answer to your previous question gives some more information about plot ranges [Set range of x axis](https://mathematica.stackexchange.com/questions/11997/how-can-i-set-the-range-of-x-axis)