I can change the main font in the preamble using
\usepackage{fontspec}
\setmainfont{Arial}
but it only works for the legend but not axis tick label, I've installed Arial font. I don't want to use
\usepackage{helvet}
\usepackage{sansmath}
for they are not the same as Arial. Thank you for your help!

unicode-math, it should be able to set your\mathrmfont to Arial. (Should happen automatically if you set the main font, or use\setmathrm.) You can also\setsansfontand use\mathsfup. – Davislor Aug 11 '19 at 04:03