Subtitles Figure

1

I would like to know why a picture appears in the image in the 2dB column in the 10 ^ 0 line and how can I delete it without deleting the markers on the blue line, what do I want?

The code to do the plot is this:

#=========================== Gráfico=====================================
plt.figure(1)
plt.plot(EbNo_theory, ber_MFSK, 'b-', EbNodB, ber, 'ko')
plt.axis([0, 8, 1e-4, 1e0])
plt.xscale('linear')
plt.yscale('log')
plt.xlabel('EbNo(dB)')
plt.ylabel('BER')
plt.grid(True)
plt.title('BER sem repetição(Teórico) - FSK Coerente com M=2')
#=======================Legendas==================
line_up, = plt.plot([1,2,3], label='Teórico', color='blue')
line_down, = plt.plot([2,3,1], marker='o', markersize=4, label='Simulado', color='black')
plt.legend(handles=[line_up, line_down])

    
asked by anonymous 15.12.2017 / 12:23

1 answer

1

Your problem is in your caption. In your code you have:

line_up, = plt.plot([1,2,3], label='Teórico', color='blue')
line_down, = plt.plot([2,3,1], marker='o', markersize=4, label='Simulado', color='black')

Because X and Y have not been specified, you actually have the (X, Y) pairs in (0,1), (1,2), (2,3) for line_up and (0,2), (1.3), (2.1) for line_down .

The last point (2,1) is plotted with a black mark and appears on your chart at the point mentioned. I think the dot (0,1) in blue should appear too, but since it's a line up, it does not get so marked.

To resolve you can declare the caption together when you plot your values and remove the current part for caption or use the appropriate values in the chart for your dummy plot , as below:

line_up, = plt.plot([100,100,100],[1,2,3], label='Teórico', color='blue')
line_down, = plt.plot([100,100,100],[2,3,1], marker='o', markersize=4, label='Simulado', color='black')
    
15.12.2017 / 19:34