1
$\begingroup$

Where is mistake?

Length[v1]=16384

Length[en]=16384

{v1, f1, en, time} = exp[[1, 2 ;;, {6, 7, 8, 9}]] // Transpose;
{v1, n} = exp[[1, 2 ;;, {6, 1}]] // Transpose;

 ListLinePlot[{n, v1} // Transpose, 
 Ticks -> {MapIndexed[{First@#2, Rotate[#, 90 Degree]} &, en], 
   Automatic}, ImageSize -> Medium, PlotRange -> Automatic]

enter image description here

How to reduce the step of "Ticks" values on Axis X?

I test this code:

data1 = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10};
data2 = {3.3, 3.1, 3, 3.5, 3.13, 2.4, 2.12, 2.87, 4.3, 5};
data3 = {14, 27, 125, 256, 350, 14, 19, 126, 250, 310};
ListLinePlot[Transpose@{data1, data2}, 
 Ticks -> {MapIndexed[{First@#2, Rotate[#, 90 Degree]} &, data3], 
   Automatic}]

It is ok.

ListLinePlot[{n, v1} // Transpose, 
 Ticks -> {MapIndexed[{First@#2, Rotate[#, 90 Degree]} &, 
    en[[;; ;; 100]]], Automatic}, ImageSize -> Medium, 
 PlotRange -> Automatic, ImageSize -> Large]

enter image description here

$\endgroup$
  • 2
    $\begingroup$ Don't use en but a subset of it for ticks generation? Like en[[ ;; ;; 10]]? $\endgroup$ – Kuba Mar 15 '17 at 11:28
  • $\begingroup$ en is subset with length 16384 points. I don't understand. {en}=exp[[1,2;;6}]]. En is a column of real values from the encoder. $\endgroup$ – Alex Mar 15 '17 at 11:41
  • 1
    $\begingroup$ And you are generating ticks for all points in en: Ticks -> {MapIndexed[{First@#2, Rotate[#, 90 Degree]} &, en]. $\endgroup$ – Kuba Mar 15 '17 at 11:42
  • 1
    $\begingroup$ I mean you generate 16k ticks and you have it. Want fewer? Reduce en you use in Ticks. $\endgroup$ – Kuba Mar 15 '17 at 11:57
  • 2
    $\begingroup$ @Alex, well, yes, you'll need to adjust the count position it aligns with. Try {MapIndexed[{100*(First@#2-1)+1, Rotate[#, 90 Degree]} &, en[[;; ;; 100]]], Automatic}. Please read the documentation on Ticks. It seems to me as if you haven't. $\endgroup$ – b3m2a1 Mar 15 '17 at 15:59