Re: [Matplotlib-users] Plotting style

2015-03-09 Thread Marin GILLES

Le 10/03/2015 07:52, Eric Firing a écrit :

On 2015/03/09 8:14 PM, Marin GILLES wrote:

Hi,
As suggested in PR 2702
, I have been trying
to tell |scatter| to |get_current_color_cycle| for the facecolor. I
guess I can use |axes.get_color()|to get the current color in the color
cycle.
However, I was not able to try this, as when I try to import pyplot I
get an |ImportError: No module named _path|. It seems to be library
related, but I’m not quite sure how I can solve this…

It sounds like your installation is broken; _path is an extension module
compiled from C++, and central to matplotlib's functionality.

In what environment are you working?  Did this failure arise after you
modified code and then executed "python setup.py install" or something
of that sort?

Eric

--
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
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users

Actually, I just brute loaded mpl for source... I am not really used to it.
So I guess I'll have to make a virtual env and install mpl in it?

--
*Marin GILLES*
/PhD student CNRS
/ /Laboratoire Interdisciplinaire Carnot de Bourgogne (ICB)
UMR 6303 CNRS - Université de Bourgogne
9 av Alain Savary, BP 47870
21078, Dijon (France)
/ ☎ (+33)6.79.35.30.11
✉ marin.gil...@u-bourgogne.fr 
--
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
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] Plotting style

2015-03-09 Thread Eric Firing
On 2015/03/09 8:14 PM, Marin GILLES wrote:
> Hi,
> As suggested in PR 2702
> , I have been trying
> to tell |scatter| to |get_current_color_cycle| for the facecolor. I
> guess I can use |axes.get_color()|to get the current color in the color
> cycle.
> However, I was not able to try this, as when I try to import pyplot I
> get an |ImportError: No module named _path|. It seems to be library
> related, but I’m not quite sure how I can solve this…

It sounds like your installation is broken; _path is an extension module 
compiled from C++, and central to matplotlib's functionality.

In what environment are you working?  Did this failure arise after you 
modified code and then executed "python setup.py install" or something 
of that sort?

Eric

--
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
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] Plotting style

2015-03-09 Thread Marin GILLES

Le 06/03/2015 22:42, Marin GILLES a écrit :

This package is indeeed pretty nice, and I will surely take a look 
into it, but the way styles are added does not seem quite practical or 
shareable.
In my opinion, having a style file for each paper makes things more 
flexible, although this package may get more control out of the box.
Also, not being built-in makes you install an other package, and I 
think some people either do not want to do it, nor know how to do it.


On an other topic, I started working on some of the features you 
wanted to integrate with your PR 
. I guessed that 
when you talked about adding the |set_ticks_location| to the rcParams, 
you wanted to control whether the ticks are in or out of the axes box?


Finally, I added a |style| parameter to the rcParams. It lets you 
choose from your |matplotlibrc| which style you want to use. On top of 
that, I made it recursive, so that you can design a style directly 
from other styles.
The only thing I could not get to work was to have your style loading 
directly when importing matplotlib (when defining from your rc file). 
You actually have to import the |matplotlib.style| lib to get your rc 
defined style to load up.


I will continue working on the other features described in olga’s PR 
 before submitting 
one on my own. But if you want to take a look, and tell me how I can 
improve what I did, you can find it on my repo 
.


Thanks
Marin

Le 06/03/2015 22:18, Olga Botvinnik a écrit :

There's also the "plotsettings" package which makes it easy to switch 
between styles required by different papers.


https://pypi.python.org/pypi/plotsettings

On Wed, Mar 4, 2015 at 1:29 PM Marin GILLES > wrote:


Le 04/03/2015 06:21, Tony Yu a écrit :

On Tue, Mar 3, 2015 at 11:50 AM, Gökhan Sever
mailto:gokhanse...@gmail.com>> wrote:

I see seaborn has "paper, notebook, talk, and poster" options.
http://stanford.edu/~mwaskom/software/seaborn-dev/aesthetics.html

Apperantly he scales each parameter to get modified views.
This would be a good addition for any of the styles
available in matplotlib.


A similar pattern with `matplotlib.style` would use chained
stylesheets. The idea would be to make stylesheets either
aesthetics focused or layout focused. By aesthetics, I mean
things like colors and marker shape, and by layout, I mean
things like default figure size, figure padding, font size, etc.
Then you can easily have a style that defines the general
aesthetics and easily modify it for papers, talks, etc.

Here's an example from `mpltools`, but the same syntax applies
to the `style` module in `matplotlib`:


http://tonysyu.github.io/mpltools/auto_examples/style/plot_multiple_styles.html

(PoF = Physics of Fluids journal; IIRC I think I have some
personal stylesheets that take the normal two-column figure
layout and convert it to a full-page layout.)

-Tony


On Tue, Mar 3, 2015 at 12:35 PM, Marin GILLES
mailto:mrngil...@gmail.com>> wrote:

Le 03/03/2015 18:15, Gökhan Sever a écrit :



On Tue, Mar 3, 2015 at 12:07 PM, Marin GILLES
mailto:mrngil...@gmail.com>> wrote:




Sure, I'll be careful about that.
I'm going to go try and design some new interesting
ones.
Maybe adding some styles specific to some plot
types could be useful.
Also some styles specific for some applications
(geoscience, biology)?
If you have any other ideas, please let me know.

-- 
*Marin GILLES*



It would be good to have styles for "paper" and
"presentation" modes. The former would have smaller
ticks, labels, linewidths, other axis elements that
goes into a journal publication, while the latter with
much magnified elements to be clearly visible on a
screen from the back of a room.

Indeed it would be a very good idea.
I've seen that already in the seaborn lib I guess.

-- 
*Marin GILLES*

/PhD student CNRS
/ /Laboratoire Interdisciplinaire Carnot de Bourgogne (ICB)
UMR 6303 CNRS - Université de Bourgogne
9 av Alain Savary, BP 47870
21078, Dijon (France)
/ ☎ (+33)6.79.35.30.11 
✉ marin.gil...@u-bourgogne.fr





-- 
Gökhan



--
Dive into the World of Parallel Programmi

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

2015-03-09 Thread Benjamin Root
You might need to put parentheses around the statement for the lambda...

formatter = FuncFormatter(lambda x, pos: ("%d" % x/10))

Also, a tweak to my code. Change most of the "plt" to "ax" and use the
appropriate methods. I suspect that the ipython session you are in is
messing up the pyplot state machine and so being explicit for which axes
object you are operating on can prevent those blank plots.

ax.plot(D.dtrajs[0])

ax.set_ylabel('O2-Fe distance')

ax.set_xlabel('Frame')

plt.show()


Cheers!
Ben Root


On Mon, Mar 9, 2015 at 2:49 PM, Christian Jorgensen 
wrote:

> I want to thank the users for their invaluable help.
>
>
>
>
> My final error concerns the plotting:
>
>
>
>  in (x, pos)> 1 formatter = 
> FuncFormatter(lambda x, pos: "%d" % x/10)  2   3 fig, ax = 
> plt.subplots()  4 ax.yaxis.set_major_formatter(formatter)  5 a= 
> plt.plot(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])))
>>
>> plt.plot(D.dtrajs[0])
>>
>> plt.ylabel('O2-Fe distance')
>>
>> plt.xlabel('Frame')
>>
>>
>>
>> ---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 callable
>>
>>
>>
>> On Mon, Mar 9, 2015 at 6:35 PM, Christian Jorgensen 
>> wrote:
>>
>>> Thanks,
>>>
>>>
>>> I ran Benjamin's code but it doesn't display the
>>> figure anymore. It only prints a text about the figure
>>>
>>>
>>> formatter = FuncFormatter(lambda x, pos: "%d" % x/10)
>>>
>>>
>>>
>>> fig, ax = plt.subplots()
>>>
>>> ax.yaxis.set_major_formatter(formatter)
>>>
>>> plt.plot(D.dtrajs[0])
>>>
>>> plt.ylabel('O2-Fe distance')
>>>
>>> plt.xlabel('Frame')
>>>
>>> plt.show()
>>>
>>> 
>>>
>>>
>>>
>>>
>>>
>>> On Mon, Mar 9, 2015 at 6:16 PM, Benjamin Root  wrote:
>>>
 Or just do this:

 formatter = FuncFormatter(lambda x, pos: "%d" % x/10)
 fig, ax = 
 plt.subplots()ax.yaxis.set_major_formatter(formatter)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(array))
> x = x/10.
> plot(x,array)
>
> -Sterling
>
> On Mar 9, 2015, at 10:57AM, Christian Jorgensen 
> 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
> 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<
> chrisj...@gmail.com> 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
> > Matplotlib-users@lists.sourceforge.net
> > https://lis

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

2015-03-09 Thread Christian Jorgensen
I want to thank the users for their invaluable help.




My final error concerns the plotting:



 in (x, pos)> 1 formatter
= FuncFormatter(lambda x, pos: "%d" % x/10)  2   3 fig, ax =
plt.subplots()  4 ax.yaxis.set_major_formatter(formatter)  5
a= plt.plot(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])))
>
> plt.plot(D.dtrajs[0])
>
> plt.ylabel('O2-Fe distance')
>
> plt.xlabel('Frame')
>
>
>
> ---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 callable
>
>
>
> On Mon, Mar 9, 2015 at 6:35 PM, Christian Jorgensen 
> wrote:
>
>> Thanks,
>>
>>
>> I ran Benjamin's code but it doesn't display the
>> figure anymore. It only prints a text about the figure
>>
>>
>> formatter = FuncFormatter(lambda x, pos: "%d" % x/10)
>>
>>
>>
>> fig, ax = plt.subplots()
>>
>> ax.yaxis.set_major_formatter(formatter)
>>
>> plt.plot(D.dtrajs[0])
>>
>> plt.ylabel('O2-Fe distance')
>>
>> plt.xlabel('Frame')
>>
>> plt.show()
>>
>> 
>>
>>
>>
>>
>>
>> On Mon, Mar 9, 2015 at 6:16 PM, Benjamin Root  wrote:
>>
>>> Or just do this:
>>>
>>> formatter = FuncFormatter(lambda x, pos: "%d" % x/10)
>>> fig, ax = 
>>> plt.subplots()ax.yaxis.set_major_formatter(formatter)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(array))
 x = x/10.
 plot(x,array)

 -Sterling

 On Mar 9, 2015, at 10:57AM, Christian Jorgensen 
 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 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<
 chrisj...@gmail.com> 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
 > Matplotlib-users@lists.sourceforge.net
 > 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/

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

2015-03-09 Thread Christian Jorgensen
Sterling,

this doesn't work, as it's using the array as a function

x = D.dtrajs[0](range(len(D.dtrajs[0])))

plt.plot(D.dtrajs[0])

plt.ylabel('O2-Fe distance')

plt.xlabel('Frame')



---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 callable



On Mon, Mar 9, 2015 at 6:35 PM, Christian Jorgensen 
wrote:

> Thanks,
>
>
> I ran Benjamin's code but it doesn't display the
> figure anymore. It only prints a text about the figure
>
>
> formatter = FuncFormatter(lambda x, pos: "%d" % x/10)
>
>
>
> fig, ax = plt.subplots()
>
> ax.yaxis.set_major_formatter(formatter)
>
> plt.plot(D.dtrajs[0])
>
> plt.ylabel('O2-Fe distance')
>
> plt.xlabel('Frame')
>
> plt.show()
>
> 
>
>
>
>
>
> On Mon, Mar 9, 2015 at 6:16 PM, Benjamin Root  wrote:
>
>> Or just do this:
>>
>> formatter = FuncFormatter(lambda x, pos: "%d" % x/10)
>> fig, ax = 
>> plt.subplots()ax.yaxis.set_major_formatter(formatter)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(array))
>>> x = x/10.
>>> plot(x,array)
>>>
>>> -Sterling
>>>
>>> On Mar 9, 2015, at 10:57AM, Christian Jorgensen 
>>> 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 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<
>>> chrisj...@gmail.com> 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
>>> > Matplotlib-users@lists.sourceforge.net
>>> > 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
>>> > Matplotlib-users@lists.sourceforge.net
>>> > https://lists.sourceforge.net/lists/listinfo/matplotlib-users
>>>
>>>
>>>
>>> --
>>> 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
>>> conve

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

2015-03-09 Thread Christian Jorgensen
Thanks,


I ran Benjamin's code but it doesn't display the
figure anymore. It only prints a text about the figure


formatter = FuncFormatter(lambda x, pos: "%d" % x/10)



fig, ax = plt.subplots()

ax.yaxis.set_major_formatter(formatter)

plt.plot(D.dtrajs[0])

plt.ylabel('O2-Fe distance')

plt.xlabel('Frame')

plt.show()







On Mon, Mar 9, 2015 at 6:16 PM, Benjamin Root  wrote:

> Or just do this:
>
> formatter = FuncFormatter(lambda x, pos: "%d" % x/10)
> fig, ax = 
> plt.subplots()ax.yaxis.set_major_formatter(formatter)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(array))
>> x = x/10.
>> plot(x,array)
>>
>> -Sterling
>>
>> On Mar 9, 2015, at 10:57AM, Christian Jorgensen 
>> 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 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
>> 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
>> > Matplotlib-users@lists.sourceforge.net
>> > 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
>> > Matplotlib-users@lists.sourceforge.net
>> > https://lists.sourceforge.net/lists/listinfo/matplotlib-users
>>
>>
>>
>> --
>> 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
>> Matplotlib-users@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
>>
>
>


-- 
___

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 li

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

2015-03-09 Thread Benjamin Root
Or just do this:

formatter = FuncFormatter(lambda x, pos: "%d" % x/10)
fig, ax = 
plt.subplots()ax.yaxis.set_major_formatter(formatter)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(array))
> x = x/10.
> plot(x,array)
>
> -Sterling
>
> On Mar 9, 2015, at 10:57AM, Christian Jorgensen 
> 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 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
> 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
> > Matplotlib-users@lists.sourceforge.net
> > 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
> > Matplotlib-users@lists.sourceforge.net
> > https://lists.sourceforge.net/lists/listinfo/matplotlib-users
>
>
>
> --
> 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
> Matplotlib-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
>
--
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
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


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

2015-03-09 Thread Sterling Smith
That was untested.  It should start with (still untested)

x = array(range(len(array))

On Mar 9, 2015, at 11:11AM, Sterling Smith  wrote:

> Christian,
> 
> To define your x coordinate, try 
> x = range(len(array))
> x = x/10.
> plot(x,array)
> 
> -Sterling
> 
> On Mar 9, 2015, at 10:57AM, Christian Jorgensen  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 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 
>> 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
>> Matplotlib-users@lists.sourceforge.net
>> 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
>> Matplotlib-users@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
> 
> 
> --
> 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
> Matplotlib-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/matplotlib-users


--
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
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


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

2015-03-09 Thread Sterling Smith
Christian,

To define your x coordinate, try 
x = range(len(array))
x = x/10.
plot(x,array)

-Sterling

On Mar 9, 2015, at 10:57AM, Christian Jorgensen  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 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 
> 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
> Matplotlib-users@lists.sourceforge.net
> 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
> Matplotlib-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/matplotlib-users


--
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
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


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

2015-03-09 Thread Christian Jorgensen
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  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 
>> 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  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 <
> chrisj...@gmail.com> 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
>> Matplotlib-users@lists.sourceforge.net
>> 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
>>> Matplotlib-users@lists.sourceforge.net
>>> 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
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


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

2015-03-09 Thread Benjamin Root
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 
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  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 >> > 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
 Matplotlib-users@lists.sourceforge.net
 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
> Matplotlib-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
>
>
--
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
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


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

2015-03-09 Thread Christian Jorgensen
> 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  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 
>> 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
>>> Matplotlib-users@lists.sourceforge.net
>>> 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
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


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

2015-03-09 Thread Benjamin Root
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 
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
> Matplotlib-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
>
>
--
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
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


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

2015-03-09 Thread Sterling Smith
Christian,

It sounds like you want to rescale your x axis values before plotting or use 
the x axis formatter.  For the latter see
http://matplotlib.org/examples/pylab_examples/major_minor_demo1.html
http://matplotlib.org/examples/pylab_examples/custom_ticker1.html

-Sterling

On Mar 9, 2015, at 10:38AM, Christian Jorgensen  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
> Matplotlib-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/matplotlib-users


--
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
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


[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 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
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] Newbie Q re: Lorenz attractor

2015-03-09 Thread Prahas David Nafissian
Dear Ben, Amit, and Ryan,

Thanks so much for your input!  Looking forward to
finding the time to give it a go!

Best,

--Prahas


On Sun, Mar 8, 2015 at 7:14 PM, Benjamin Root  wrote:
> Yes, absolutely it will work... so long as you do not use blitting. Blitting
> for mplot3d is pretty much useless anyway (I think draws of the axes occur
> anyway regardless of the blit mode), but it is also broken for the macosx
> backend, anyway.
>
> Cheers!
> Ben Root
>
> On Sun, Mar 8, 2015 at 8:59 PM, Amit Saha  wrote:
>>
>> On Mon, Mar 9, 2015 at 7:31 AM, Prahas David Nafissian
>>  wrote:
>> > Hi,
>> >
>> > I want to create an animation of the Lorenz attractor,
>> > plotting each new point as it is generated by the
>> > equations.  So we see the graph "being drawn"
>> > over time.
>>
>> You will very likely need to use the animation API for this. I
>> recently tried to demonstrate the Henon function in a fashion that it
>> appears I am drawing it over time:
>> https://www.youtube.com/watch?v=76ll818RlpQ
>>
>> You can see the code linked from there:
>>
>> https://github.com/amitsaha/playground/blob/master/recipes/henon_animation.py
>>
>> That might give you a starting point of what you are trying to do.
>>
>> >
>> > Also, as it is being drawn, I want to be able to
>> > rotate the screen in 3 dimensions.
>>
>> Sorry, nothing much I can add here.
>>
>> Best,
>> Amit.
>>
>> --
>> http://echorand.me
>>
>>
>> --
>> 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
>> Matplotlib-users@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
>
>

--
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
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users