Serial monitor

I am trying to map out my joystick on the serial monitor, but all I can see is gibberish. The gibberish does change when I move my joystick around, so I know that hardware isn't the problem. I tried changing the baud rate to see if it would help, but it didn't. Any help would be appreciated as I am new to Arduino and programming in general. Here's the code:

int VRx = A0;
int VRy = A1;
int SW = 2;

int xPosition = 0;
int yPosition = 0;
int SW_state = 0;
int mapX = 0;
int mapY = 0;

void setup() {
Serial.begin(9600);

pinMode(VRx, INPUT);
pinMode(VRy, INPUT);
pinMode(SW, INPUT_PULLUP);

}

void loop() {
xPosition = analogRead(VRx);
yPosition = analogRead(VRy);
SW_state = digitalRead(SW);
mapX = map(xPosition, 0, 1023, -512, 512);
mapY = map(yPosition, 0, 1023, -512, 512);

Serial.print("X: ");
Serial.print(mapX);
Serial.print(" | Y: ");
Serial.print(mapY);
Serial.print(" | Button: ");
Serial.println(SW_state);

delay(100);

}

but all I can see is gibberish

The serial monitor must be set to the same baud rate as the code is producing.

Grumpy_Mike:
The serial monitor must be set to the same baud rate as the code is producing.

Check the current setting bottom right of serial monitor window...

How did you wire up your joystick? What connections did you make?

Thanks for taking time out of your day guys. I think it had something to do with my computer because I closed the tab, unplugged the USB, and tried again. It works, with only the occasional question mark in a black diamond. I might have to scan this computer for viruses.