Re: [Matplotlib-users] plt scale x-axis by constant factor f

2015-03-09 Thread Christian Jorgensen
ot(D.dtrajs[0]) TypeError: unsupported operand type(s) for /: 'str' and 'int' On Mon, Mar 9, 2015 at 6:40 PM, Christian Jorgensen wrote: > Sterling, > > this doesn't work, as it's using the array as a function > > x = D.dtrajs[0](range(len(D.dtrajs[0]))

Re: [Matplotlib-users] plt scale x-axis by constant factor f

2015-03-09 Thread Christian Jorgensen
-TypeError Traceback (most recent call last) in ()> 1 x = D.dtrajs[0](range(len(D.dtrajs[0]))) 2 plt.plot(D.dtrajs[0]) 3 plt.ylabel('O2-Fe distance') 4 plt.xlabel('Frame') TypeError: 'numpy.ndarray' object is not callabl

Re: [Matplotlib-users] plt scale x-axis by constant factor f

2015-03-09 Thread Christian Jorgensen
plt.plot(D.dtrajs[0]) > plt.ylabel('O2-Fe distance') > plt.xlabel('Frame') > plt.show() > > > > On Mon, Mar 9, 2015 at 2:11 PM, Sterling Smith > wrote: > >> Christian, >> >> To define your x coordinate, try >> x = range(len(arra

Re: [Matplotlib-users] plt scale x-axis by constant factor f

2015-03-09 Thread Christian Jorgensen
en't sufficient. As for formatting x "because it is not >> defined", what is not defined? The formatting or x? >> >> On Mon, Mar 9, 2015 at 1:57 PM, Christian Jorgensen >> wrote: >> >>> >>> My array does not have an explicit x-coordinate

Re: [Matplotlib-users] plt scale x-axis by constant factor f

2015-03-09 Thread Christian Jorgensen
ust modify the >> formatter used by the tickers to report the value as divided by 10. >> http://matplotlib.org/examples/pylab_examples/custom_ticker1.html >> >> Cheers! >> Ben Root >> >> >> On Mon, Mar 9, 2015 at 1:38 PM, Christian Jorgensen >> wrote

[Matplotlib-users] plt scale x-axis by constant factor f

2015-03-09 Thread Christian Jorgensen
How can I scale my x-axis [0,3000] for the data to now correspond/show up as [0, 300]? In xmgrace, this is done with a linear transformation, but I cannot seem to find the command to do this with matplotlib. Best -- Dive