We demonstrate a one-dimensional magnetic system can exhibit a Cantor-type spectrum using an example of a chain graph with coupling at the vertices exposed to a magnetic field perpendicular to the graph plane and varying along the chain. If the field grows linearly with an irrational slope, measured in terms of the flux through the loops of the chain, we demonstrate the character of the spectrum relating it to the almost Mathieu operator.