separate functions to create qdata and CranvasPlot obj