Added drawing function for function representation