addressed issue #572

If the user provides a margin that sufficiently contains the graph, the graph is exported as is. If the provided margin trims the graph, the approach will progressively increase the margin till it is completely contained. Apart from fitting the nodes, edges are also fit. The solution works if we have the rendered image in the form of a linearized pixels array. Unfortunately, I couldnt find anything equivalent to this structure in the case of PDF and SVG. Hence, I was not able to apply it in those cases.