|
From: Christian J. <chr...@gm...> - 2015-03-09 18:12:25
|
My array is called D.dtrajs[0]
I'm plotting it as
plt.plot(D.dtrajs[0])
plt.ylabel('O2-Fe distance')
plt.xlabel('Frame')
There is thus no x-variable defined to
scale or modify. How would you do this?
>
>
> On Mon, Mar 9, 2015 at 6:03 PM, Benjamin Root <ben...@ou...> wrote:
>
>> I am not sure I understand. I took your question as "how do I make my x
>> tick labels show values as [0, 300] when my values really are [0, 3000]?".
>> Are the indexes you speak of ranging from 0 to 3000? If so, I don't see how
>> our examples aren'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 <chr...@gm...>
>> wrote:
>>
>>>
>>> My array does not have an explicit x-coordinate
>>>> representation. The x-coordinate is simply the index.
>>>>
>>>> print(array)
>>>> [ 0 0 20 ..., 8 8 8]
>>>>
>>>>
>>>> Thus what I would like is to adjoin the element
>>>> index as another row, how is this possible?
>>>>
>>>>
>>>> I cannot format x because it is not explicitly defined.
>>>>
>>>>
>>>>
>>>> On Mon, Mar 9, 2015 at 5:52 PM, Benjamin Root <ben...@ou...> wrote:
>>>>
>>>>> Ok, this really should be simple (and I am sure it is), but I cannot,
>>>>> for the life of me, find the appropriate documentation for it. We need
>>>>> better documentation about how to utilize the offset-text feature of
>>>>> tickers. It can be either a multiple offset or an additive offset.
>>>>>
>>>>> In any case, I know there is a better way to do this, but here is a
>>>>> quick-n-dirty example that can get you where you want. Just 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 <
>>>>> chr...@gm...> wrote:
>>>>>
>>>>>> 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 into the World of Parallel Programming The Go Parallel Website,
>>>>>> sponsored
>>>>>> by Intel and developed in partnership with Slashdot Media, is your
>>>>>> hub for all
>>>>>> things parallel software development, from weekly thought leadership
>>>>>> blogs to
>>>>>> news, videos, case studies, tutorials and more. Take a look and join
>>>>>> the
>>>>>> conversation now. http://goparallel.sourceforge.net/
>>>>>> _______________________________________________
>>>>>> Matplotlib-users mailing list
>>>>>> Mat...@li...
>>>>>> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
>>>>>>
>>>>>>
>>>>>
>>>>
>>>>
>>>> --
>>>> _______
>>>>
>>>> Christian Jørgensen
>>>>
>>>
>>>
>>>
>>> --
>>> _______
>>>
>>> Christian Jørgensen
>>>
>>>
>>> ------------------------------------------------------------------------------
>>> Dive into the World of Parallel Programming The Go Parallel Website,
>>> sponsored
>>> by Intel and developed in partnership with Slashdot Media, is your hub
>>> for all
>>> things parallel software development, from weekly thought leadership
>>> blogs to
>>> news, videos, case studies, tutorials and more. Take a look and join the
>>> conversation now. http://goparallel.sourceforge.net/
>>> _______________________________________________
>>> Matplotlib-users mailing list
>>> Mat...@li...
>>> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
>>>
>>>
>>
>
>
> --
> _______
>
> Christian Jørgensen
>
--
_______
Christian Jørgensen
|