Let’s assume that we use the default “weight” for the feature importance type. It seems that the plot_importance function biases against categorical features. My understanding is that XGBoost requires that categorical features go through one-hot encoding. Consequently, each categorical feature transforms into N sub-categorical features, where N is the number of possible outcomes for this categorical feature.
Then each sub-categorical feature would compete with the rest of sub-categorical features and all numerical features. It is much easier for a numerical feature to get higher importance ranking, isn’t it?