1. A method for measuring density, comprising: forming on a medium a pattern that consists of a plurality of dot rows formed respectively in a plurality of row regions lined up in a direction intersecting a movement direction in which a plurality of nozzles move, by forming each of the dot rows in the row region arranged in the movement direction by ejecting ink from the nozzles; reading the pattern by a scanner; measuring density of each of the row regions of the read pattern; calculating respective modification values corresponding to each of the row regions, based on at least a part of a measurement result of the density of the row regions; and modifying respective measured values of the density of each of the row regions based on the respective modification values corresponding to each of the row regions, wherein: a linear fitting line and an average value are obtained from the at least a part of the measurement result; and the respective modification values corresponding to each of the row regions are calculated respectively depending on a difference between a value of the linear fitting line in each of the row regions and the average value.