Advertisement
Guest User

Untitled

a guest
Feb 27th, 2015
350
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.71 KB | None | 0 0
  1. fig = plt.figure()
  2. ax = plt.subplot(121) # To show the ascending order
  3. plt.xlabel ('RF Input Power (dBm)', fontsize = 'small')
  4. plt.ylabel ('Gain (dB)', fontsize = 'small')
  5. tx = plt.title('Gain Vs Ascending RFInputAmpl for ' + str(measuredFrequencyUnderTest) + 'MHz', fontsize = 'small')
  6. axPlotAxis = plt.axis([rfInputMin, rfInputMax, -20.0, 30.0])
  7.  
  8. # Now, Plot all the gain stages across the RFInput
  9. ax.plot(rfInput_Plot, lna_Pre_Plot, color = 'r', marker = '+', label = 'lna_Pre')
  10. ax.plot(rfInput_Plot, lna_Post_Plot, color = 'm', marker = 'x', label = 'lna_Post')
  11. ax.plot(rfInput_Plot, sampler1_Plot, color = 'k', marker = '*', label = 'Sampler1')
  12. ax.plot(rfInput_Plot, sampler2_Plot, color = 'c', marker = 's', label = 'Sampler2')
  13. ax.plot(rfInput_Plot, vga_Plot, color = 'b', marker = 'p', label = 'VGA')
  14. ax.plot(rfInput_Plot, dagc1_Plot, color = 'g', marker = 'H', label = 'DAGC1')
  15. ax.plot(rfInput_Plot, dagc2_Plot, color = 'y', marker = 'v', label = 'DAGC2')
  16.  
  17. # Put the Legend
  18. ax.legend(loc='upper center', bbox_to_anchor = (1.3, -0.05), shadow=True,numpoints = 1, prop = legend_font_props, ncol = 3)
  19.  
  20. # Now, come to the second plot
  21. ay = plt.subplot(122) # To show the descending order
  22. plt.xlabel ('RF Input Power (dBm)', fontsize = 'small')
  23. plt.ylabel ('Gain (dB)', fontsize = 'small', horizontalalignment = 'left')
  24. ty = plt.title('Gain Vs Descending RF Input for '+ str(measuredFrequencyUnderTest)+ 'MHz', fontsize = 'small')
  25.  
  26. # Now, fix the x axis here in descending order
  27. plt.axis([rfInputMax, rfInputMin, y_Min_Value, y_Max_Value])
  28. plt.minorticks_on()
  29.  
  30. In [8]: ax = plt.subplot(121)
  31. In [9]: ay = plt.subplot(122)
  32. In [10]: ax.set_xlim((-1,2))
  33. In [11]: ax.set_ylim((10,20))
  34. In [12]: ay.set_xlim((-10,4))
  35. In [13]: ay.set_ylim((3,5))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement