public void draw(Graphics2D g) {
		if (this.m_PointsSet.isEmpty()) return;
		
        Graphics2D g2d = (Graphics2D) g;
        int pointSize = 4;
        
        // sets the width and height of rendering area (take in account margin)
        int w = this.getInnerWidth();
        int h = this.getInnerHeight();
        
        /***
         * rendering margin borders
         */
        if (this.m_DrawBorder)
        {
        	int lnX = rX(0); // rX(0) is same as leftmargin
        	int lnY = rY(0);
	        g2d.setColor(Color.DARK_GRAY);
	        g2d.drawLine(lnX, lnY, lnX, lnY+h);
	        g2d.drawLine(lnX, lnY+h, lnX+w, lnY+h);
	        g2d.drawLine(lnX+w, lnY+h, lnX+w, lnY);
	        g2d.drawLine(lnX+w, lnY, lnX, lnY);
        }
        
        /***
         * point rendering calculations
         */
        // finds the maximum & minimum rendering coordinates to fit points properly
        
        double  maxX = this.m_MaxX, 
        		maxY = this.m_MaxY, 
        		minX = this.m_MinX, 
        		minY = this.m_MinY;

        double wScale = (double)w/(maxX-minX);
        double hScale = (double)h/(maxY-minY);

        /***
         * rendering the points
         */
        for (Entry<String, DataPoints> e: this.m_PointsSet.entrySet())
        {
        	// sets the color (if defined) for points
        	if (this.m_PointsSetColor.containsKey(e.getKey()))
        	{
        		g2d.setColor(this.m_PointsSetColor.get(e.getKey()));
        	} else {
        		g2d.setColor(this.m_Default);
        	}
        	
        	// render points
        	DataPoints dp = e.getValue();
	        for (DataPoint p: dp)
	        {
	        	int x = (int)((p.getX()-minX)*wScale) - pointSize/2;
	        	int y = (int)((p.getY()-minY)*hScale);
	        	// flips the Y axis so we get natural visualization (zero at bottom)
	        	y = y*(-1)+h;
	        	// compensate for point size
	        	y = y - pointSize/2;
	        	g2d.fillOval(rX(x), rY(y), pointSize, pointSize);
	        }
        }
        
        /***
         * rendering axis
         */
        if (this.m_DrawAxis)
        	drawAxis(g2d, maxX, minX, maxY, minY);
	}