Plotting graphs for MYSQL
There are values that you need to graph with absolute values, such as


Innodb_buffer_pool_bytes_dirty
Threads_connected
Threads_running


There are also values whose delta needs to be calculated and graphed, such as


Queries


Com_select
Com_delete
Com_update
etc ...

Incoming and Outgoing Traffic


Bytes_received
Bytes_sent



You should consider using Nagios XI or MONyog to do all that for you.

If you want to be a hero, use Google Charts


Google Chart API - A Real World Example
Sample Chart You Need to Craft in a Bash Script Using the Deltas and Absolute Values


I used Google Chart a few times and got away from it. It does work, but you have a lot of coding to store the absolute values and calculate deltas for specific variables. Then, you script the URL from the values and render the URL in a browser. 

GIVE IT A TRY, HERO !!!