a Visual stimuli consisted of drifting gratings with eight different directions, which were composed of white and black bars sweeping across a screen at eight different direction angles. The screen was positioned 13 cm away from the right eye of mice. Changes in pH were recorded from the primary visual cortex (V1) for each angle. b After a 120 s pre-stimulation phase (gray screen), the stimulation phase comprised a 2 s visual stimulus (one of eight drifting gratings directions was randomly selected each time) and an 8 s interval (gray screen) presented to the mice. This was repeated 30 times (trials) for each of the eight drifting gratings direction. c, d Observation of changes in pH caused by visual stimuli. Imaging at the pixel-by-pixel resolution revealed that different types of responses were induced by different directions of drifting gratings. The value at each pixel was calculated as the difference between the pH measured for each drifting gratings direction and the mean pH measured across all eight directions, in a representative mouse brain (c) or in representative HEPES-buffered saline (d). White dotted lines indicate borderlines between the brain and HEPES buffer, which were detected by photoelectric effect (see Supplementary Fig. 2). The source data underlying Fig. 2c, d are provided as a Source Data file.