Having trouble understanding the x and y axis in SVM when training and testing data
The answer to your questions is simply : that is how training works : 

The training set is a matrix in which the last column correspond to the labels and the rest correspond to the samples. 

When slicing  the matrix, you have two parts: the first one concerns the rows, the second one concerns the columns.

ROWS:

:partition means in fact the first 80% rows - this concerns the training set x_train, y_train

partition: means the last 20% rows - concerns the test set, x_test and y_test

COLUMNS:

:-1 mean all but the last column - concerns x_train and x_test

-1: mean just the last column - concerns y_train and y_test

Therefore, here you get for x_train and x_test everything but the last value. Be careful, in fact you get 80% of the data is for x_train (:partition) and 20% is for x_test (partition:). Now, for the labels you get only the last column, and 80% of the rows are for y_train while 20% of the rows are for y_test.

One more detail, your x_train and y_train is a 5D array, according to the documentation.