From 42cb31e678770017c1c5346fe9562e59c48bb78c Mon Sep 17 00:00:00 2001 From: Shivam Gupta Date: Sun, 5 Jun 2016 10:31:11 -0400 Subject: [PATCH] Saved as pdf and added labels --- examples/plot-connectivity.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/examples/plot-connectivity.py b/examples/plot-connectivity.py index 20991f6..6756c9d 100644 --- a/examples/plot-connectivity.py +++ b/examples/plot-connectivity.py @@ -325,8 +325,10 @@ def refine_and_generate_chart_function(mesh, filename, function): import matplotlib.pyplot as plt import matplotlib.pyplot as pt + pt.xlabel('Number of elements being refined') + pt.ylabel('Time taken') pt.plot(num_elements, time_t, "o") - pt.savefig(filename) + pt.savefig(filename, format='pdf') pt.clf() print 'DONE REFINING' ''' @@ -382,7 +384,7 @@ def main2(): #mesh = generate_box_mesh(3*(np.linspace(0, 3, 5),)) #mesh = generate_box_mesh(3*(np.linspace(0, 1, 3),)) mesh = generate_box_mesh(3*(np.linspace(0, 1, 5),)) - refine_and_generate_chart_function(mesh, "plot", sine_func) + refine_and_generate_chart_function(mesh, "plot.pdf", sine_func) def all_refine(num_mesh, depth, fname): import six -- GitLab