When you generate a graph as an image or a file, the RDK picks a default height and width for the graph. Often, these defaults will not be what you want. You can change these defaults by setting the PictureHeight and PictureWidth properties of the GraphDefaults object. For example, the following code make a graph that exactly fits in the PictureBox object called "Picture1" :
With RDKApp.GraphDefaults
.PictureHeight = Picture1.Height
.PictureWidth = Picture1.Width
End With
Set Picture1.Picture = dist.Graph(RDKCurveTypeDensity)