CLN: Removing dead code in plotting and minor refactoring
Follow up of  #26185 .
This delete dead code from the `MPLPlot._post_plot_logic_common` and move the change from #26185 into` LinePlot._post_plot_logic`.

In detail, the change are only executed when the `self.__need_to_set_index` is True
The `self._need_to_set_index` variable is only set if you call `_get_xticks`.
The only place where `_get_xticks` is called is in `LinePlot._make_plot`.
Every children of `LinePlot` that redefine `_make_plot` also redefine `_post_plot_logic`.
Therefore I move the change in `LinePlot._post_plot_logic`