That function gets executed when you use the "Change Graphic" event command. If you observe, you'll be selecting 4 things there: character graphic, it's hue, battler graphic and it's hue. That method only sets 4 variables to their respective values. If you only want to change one of those 4, read the variables you don't want to change and put them in the set_graphic method. For example, if you want to change only the charset graphic, do this:
actor = $game_actors[ACTOR_ID_IN_DATABASE]
charset_name = "Your charset name here"
charset_hue = actor.character_hue
battler_name = actor.battler_name
battler_hue = actor.battler_hue
actor.set_graphic(charset_name, charset_hue, battler_name, battler_hue)
Or, you can make those variables attr_accessors so that you can direrctly change them.