Plotting multiline graph with large dataset (6 lines, about 30, 000, 000 points total)

I am a beginner with matplotlib.
I am trying to analyze huge dataset, the plot would have multiple lines. I am getting memory error (it fails maxing out ~2.5GB on my system). I am assuming there are probably ways to simplify the data, I came across something ‘simplify’ for ‘path’, not sure how to use that in my case. My code looks something as shown below (there are 2 ways I tried), as can be seen I am using lists, would converting them to numpy arrays significantly improve things? I am yet to try that. Simplifying function would be best I guess.

The values on x-axis are cumulative measures (of memory of each element, element being some basic component in our system) and the y-axis shows percentage (obtained by some-count-of-the-element_times_memory-of-the-element/Sum of these for all elements). If this doesn’t make sense, that’s ok, the idea is the graph is expected to not contain sudden crests or troughs.

xy_pairs = [x1_vals, y1_vals, x2_vals, y2_vals…]

for each_xy_pair:
plt.plot(x_vals, y_vals)

Both of the above methods don’t work.