Illustrator pricing

Is there a set price I should charge for graphics, or it depends on the amount of time I spend working on it?

A friend of mine asked me to create an illustrator picture for her. I am just starting out, so I spent a while working on it. Around how much should my price to her be?

I always find its best to set a price, but that price should be based off of how long you expect it to take you x how much you want to be paid per hour.