Hi, I am trying to make plot using following code:-----------#!/usr/bin/pythonimport numpy as npimport matplotlib.pyplot as pltimport stringfrom pylab import savefigfrom sys import argv #input file as first argumentf1=argv[1]f = open(f1,'r')line=f.readlines()f.close() f2 = f1.split(".")#f3 = f2[0].split("-") l1=[];l2=[]for lines in line: lin=lines.split() l1.append(float(lin[0])) l2.append(float(lin[1])) #print max(l2) for i in range(len(l2)): plt.axvline(x=l1[i], ymin=0, ymax=l2[i], linewidth=2, color='r') plt.axis([350, 650, 0.0, max(l2)])plt.grid(True)savefig(f2[0]+"-"+"uv.png",dpi=(600/8))plt.show()---------------- My problem is the output plot I am getting is not showing correct values in the plot as are in the input file (MS.txt - attached). It looks like it is scaled to lower value. Please help. Regards, Saurabh
541.40 0.0276 538.28 0.0068 412.04 0.1124 410.44 0.2431 404.55 0.6708 400.88 0.0567 398.89 0.1188 397.90 0.0807 392.20 0.0054 390.31 0.0045 381.27 0.5240 375.69 0.1284 374.06 0.4551 370.11 0.1673 367.23 0.3609 356.89 0.0158 352.50 0.3642 344.91 0.2338 343.31 0.0046 339.65 0.0039 335.84 0.0569 330.11 0.0293 327.28 0.0024 320.78 0.0007 307.46 0.0002 301.01 0.1364 300.90 0.0148 299.39 0.0023 297.70 0.0169 297.45 0.0020 296.34 0.0016 295.89 0.0114 295.05 0.1512 292.67 0.0019 292.00 0.0004 291.19 0.0030 290.59 0.0013 290.27 0.0081 289.19 0.0012 288.51 0.0016 285.92 0.0000 284.90 0.0014 284.29 0.0004 281.49 0.0476 280.58 0.0001 280.19 0.0039 278.09 0.0000 276.06 0.0284 274.04 0.0009 272.22 0.0017 269.97 0.0034 269.45 0.0029 268.35 0.0047 266.96 0.0022 265.73 0.0063 263.56 0.0004 263.52 0.0000 263.31 0.0125 262.04 0.0021 261.82 0.0028 261.72 0.0008 260.59 0.0010 260.36 0.0069 259.95 0.0014 258.94 0.0096 258.87 0.0235 258.22 0.0035 257.10 0.0008 256.54 0.0013 255.77 0.0045 255.28 0.0057 255.03 0.0005 254.48 0.0068 253.98 0.0071 250.33 0.0031 249.92 0.0099 249.88 0.0000 247.69 0.0004 247.43 0.0015 247.35 0.0058 247.05 0.0003 246.57 0.0104 246.00 0.0029 244.89 0.0001 244.53 0.0005 244.02 0.0003 243.70 0.0001 243.02 0.0015 241.49 0.0068 240.94 0.0001 239.82 0.0045 239.48 0.0092 238.34 0.0002 237.39 0.0058 236.27 0.0002 235.04 0.0467 234.98 0.0095 234.63 0.0047 233.55 0.0096 233.27 0.0000
_______________________________________________ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: http://mail.python.org/mailman/listinfo/tutor