|
From: João L. S. <js...@fc...> - 2010-07-19 13:43:17
|
On 07/15/2010 02:36 PM, Clear wrote: > > Hello, > > I would like to know if it is possible to display the following feature > using matplotlib. Say that you have a 2D plot(x,y) with a lot of data. You > plot the data using a 2D solid line. Would be possible to add "some" > circles/squared or whatever to the solid line? When I say "some" I mean only > scattered values, otherwise given the quantity of data you would appreciate > the symbols. > > Thanks, > > Clear You can specify the parameter markevery=n to the plot to just plot every n-th marker. For example: import matplotlib.pyplot as plt import numpy as np N = 10000 x = np.linspace(-10.0,10.0,N) plt.plot(x,np.sin(x),"-s",markevery=N/50) plt.show() Regards, João Luís |