Re: [Matplotlib-users] Assigning "k" key for xscaling

2010-01-25 Thread Matthias Michler
Hi Gökhan,

On Monday 25 January 2010 20:04:14 Gökhan Sever wrote:
> Constrain pan/zoom to x axis hold *x* Constrain pan/zoom to y axis hold *y*
> I don't have these in my backend_bases.py file. Are these working on your
> system?

Yes they do, but only for "pan/zoom"-mode and not for "rect zoom".

Kind regards,
Matthias

> On Mon, Jan 25, 2010 at 12:58 PM, Gökhan Sever wrote:
> > Hello,
> >
> > I could these keys into rcsetup.py file as well as matplotlibrc.template
> > and update backend_bases.py accordingly. And add some documentation
> > reflecting
> > the changes made.
> >
> > # Event keys to interact with figures/plots via keyboard
> >
> > fullscreen : 'f'
> > home : 'h'
> > reset : 'r'
> > back : 'c'
> > forward : 'v'
> > pan : 'p'
> > zoom : 'o'
> > save : 's'
> > grid : 'g'
> > yscale : 'l'
> > xscale : 'k'
> >
> >
> > *Notes:*
> >
> > Matthias, leaving values as empty will remove the key short-cut.
> >
> > Don't understand exactly what 'a' does?
> >
> > f doesn't toggle full-screen --using qt4agg backend.
> >
> > There are a couple function duplicates. (eg. back with 'c' and left and
> > backspace keys. How can represent them? Create a list inside the
> > dictionary?
> > back = ['c', 'left', 'backspace']
> >
> > 'o' seems like unnecessary. Since you have to select an area using mouse.
> >
> > 's' doesn't behave correctly here. Shouldn't it bring the save dialog?
> > Instead I am getting:
> > TypeError: save_figure() takes exactly 1 argument (2 given)
> >
> >
> >
> > On Mon, Jan 25, 2010 at 8:32 AM, Matthias Michler
> >  >
> > > wrote:
> >>
> >> Hi Gökhan,
> >>
> >> I just wanted to discuss the key, because I think this patch should be
> >> part of
> >> matplotlib and not only of individual users. I think it is worth be be
> >> added
> >> to the mpl-tracker at http://sourceforge.net/tracker/?group_id=80706 or
> >> maybe
> >> one of the developers has the time to commit this small change?
> >>
> >> I think your idea about key-mappings in the matplotlib-rc is a good
> >> option to
> >> customize keyboard short cuts and even remove short-cuts which aren't of
> >> intrest for the individual user. Furthermore the latter yields space for
> >> keyboard shortcuts, which are used in one's own program.
> >>
> >> Kind regards,
> >> Matthias
> >>
> >> On Friday 22 January 2010 16:57:22 Gökhan Sever wrote:
> >> > It is very simple to change key-assignment. Take a look at the
> >> > backend_bases.py code (search for event.key instances) :
> >> >
> >> > elif event.key == 'L':
> >> >
> >> > I was thinking to move y-scaling to "y" and x-scaling to "x" but x and
> >> > y are assigned to something else (
> >> > http://matplotlib.sourceforge.net/users/navigation_toolbar.html)
> >> >
> >> > For me toggling "k" is simpler for me than doing Shift-L.
> >> >
> >> > Maybe these options could be provided in the matplotlibrc file. Users
> >>
> >> can
> >>
> >> > make their key mapping based on their choice. That requires some more
> >> > coding
> >> >
> >> > :)
> >> >
> >> > On Fri, Jan 22, 2010 at 1:59 AM, Matthias Michler
> >> >
> >> > wrote:
> >> > > Hi Gökhan, Hi list members,
> >> > >
> >> > > This is really a missing feature in matplotlib in my opinion and
> >> > > it's great that you took the time to make an suggestion, but I would
> >> > > prefer capital "L"
> >> > > for the xaxis-scaling like gnuplot although I'm not sure this is
> >> > > possible.
> >> > >
> >> > > What do you and other list members think about that?
> >> > >
> >> > > Kind regards,
> >> > > Matthias
> >> > >
> >> > > On Thursday 21 January 2010 19:45:37 Gökhan Sever wrote:
> >> > > > Hello,
> >> > > >
> >> > > > "l" key does the log - linear scaling for y-axis. I have made a
> >>
> >> minor
> >>
> >> > > > change to use "k" for x-axis scaling.
> >> > > >
> >> > > > Patch added. Feel free to add if you find it useful.
> >>
> >> 
> >>-- Throughout its 18-year history, RSA Conference consistently
> >> attracts the world's best and brightest in the field, creating
> >> opportunities for Conference
> >> attendees to learn about information security's most important issues
> >> through
> >> interactions with peers, luminaries and emerging and established
> >> companies.
> >> http://p.sf.net/sfu/rsaconf-dev2dev
> >> ___
> >> Matplotlib-users mailing list
> >> Matplotlib-users@lists.sourceforge.net
> >> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
> >
> > --
> > Gökhan



--
The Planet: dedicated and managed hosting, cloud storage, colocation
Stay online with enterprise data centers and the best network in the business
Choose flexible plans and management services without long-term contracts
Personal 24x7 support from experience hosting pros just a phone call away.
http://p.sf.net/sfu/theplanet-com
_

[Matplotlib-users] Installation error

2010-01-25 Thread Gary Robinson
Hello,

I'm trying to install matplotlib and am getting the error:

[lots of OK output]
g++ -pthread -shared build/temp.linux-x86_64-2.6/src/_png.o 
build/temp.linux-x86_64-2.6/src/mplutils.o 
build/temp.linux-x86_64-2.6/CXX/cxx_extensions.o 
build/temp.linux-x86_64-2.6/CXX/cxxsupport.o 
build/temp.linux-x86_64-2.6/CXX/IndirectPythonInterface.o 
build/temp.linux-x86_64-2.6/CXX/cxxextensions.o -L/usr/local/lib -L/usr/lib 
-L/usr/local/lib64 -L/usr/lib64 -lpng -lz -lstdc++ -lm -lpthread -ldl -lutil -o 
build/lib.linux-x86_64-2.6/matplotlib/_png.so
/usr/lib64/gcc/x86_64-suse-linux/4.1.2/../../../../x86_64-suse-linux/bin/ld: 
/usr/local/lib/libz.a(crc32.o): relocation R_X86_64_32 against `a local symbol' 
can not be used when making a shared object; recompile with -fPIC
/usr/local/lib/libz.a: could not read symbols: Bad value
collect2: ld returned 1 exit status
error: command 'g++' failed with exit status 1


Anyone have any suggestions?

Thanks
Gary
-- 

Gary Robinson
CTO
Emergent Music, LLC
personal email: gary...@me.com
work email: grobin...@flyfi.com
Company: http://www.flyfi.com
Blog:http://www.garyrobinson.net

--
The Planet: dedicated and managed hosting, cloud storage, colocation
Stay online with enterprise data centers and the best network in the business
Choose flexible plans and management services without long-term contracts
Personal 24x7 support from experience hosting pros just a phone call away.
http://p.sf.net/sfu/theplanet-com
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] two issues with labels on maps

2010-01-25 Thread Jeff Whitaker
Phillip M. Feldman wrote:
> Jeff Whitaker wrote:
>> Dr. Phillip M. Feldman wrote:
>>> The attached program generates a map and then saves it to a file.  I 
>>> have two
>>> problems with the result:
>>>
>>> (1) Note that the screenshot shows a title above the map, while the 
>>> .png
>>> file that was saved by the program does not.
>>>   
>> Philip:
>>
>> mapdemo.jpeg (which was presumably created from the png saved by your 
>> program) is totally empty.
>>> (2) I would like to be able to label the lines of latitude and 
>>> longitude,
>>> but have not been able to figure out how to do this.
>>>   
>>
>> use the label keyword to drawmeridians and drawparallels.
>>
>> -Jeff
>>
> Hello Jeff,
>
> I had tried that, but thought that it wasn't working because I wasn't 
> seeing anything on the screen.  I now think that the label parameter 
> must be working, because the lines of latitude and longitude are 
> labeled in the version of the map that is saved by the program, and 
> that I'm not seeing them on the screen because I have black text on a 
> black background.  Is there a way to control the color of the text 
> labels?  Note also that the plot title appears on the screen shot 
> jpeg, but not in the version saved by the program.  Any advice will be 
> appreciated.
>
> Philllip

Philip:  To change the color of the lat/lon lines, use the color keyword 
in drawparallels and drawmeridians (i.e. color="red").  To change the 
font color for the labels, use fontdict=dict(color='red').  The plot 
title color can be changed in the same way.
-Jeff
>
> 
>
> 
>


-- 
Jeffrey S. Whitaker Phone  : (303)497-6313
Meteorologist   FAX: (303)497-6449
NOAA/OAR/PSD  R/PSD1Email  : jeffrey.s.whita...@noaa.gov
325 BroadwayOffice : Skaggs Research Cntr 1D-113
Boulder, CO, USA 80303-3328 Web: http://tinyurl.com/5telg


--
The Planet: dedicated and managed hosting, cloud storage, colocation
Stay online with enterprise data centers and the best network in the business
Choose flexible plans and management services without long-term contracts
Personal 24x7 support from experience hosting pros just a phone call away.
http://p.sf.net/sfu/theplanet-com
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


[Matplotlib-users] LogFormatter and 0.1, 1, and 10

2010-01-25 Thread Thomas Robitaille
Hello,

I'm trying to make a log plot using set_xscale and set_yscale. The default 
LogFormatter however shows 10^-1, 10^0, and 10^1 rather than 0.1, 1, and 10 
(other plotting packages I've used usually automatically substitute these three 
common labels). Is there a way that the LogFormatter could have an extra option 
for basically enabling this (or even better, that this be made the default, 
with an option to disable - I don't see most people wanting 1 shown as 10^0)?

Cheers,

Thomas
--
The Planet: dedicated and managed hosting, cloud storage, colocation
Stay online with enterprise data centers and the best network in the business
Choose flexible plans and management services without long-term contracts
Personal 24x7 support from experience hosting pros just a phone call away.
http://p.sf.net/sfu/theplanet-com
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] two issues with labels on maps

2010-01-25 Thread Jeff Whitaker
Dr. Phillip M. Feldman wrote:
> The attached program generates a map and then saves it to a file.  I have two
> problems with the result:
>
> (1) Note that the screenshot shows a title above the map, while the .png
> file that was saved by the program does not.
>   
Philip:

mapdemo.jpeg (which was presumably created from the png saved by your 
program) is totally empty. 
> (2) I would like to be able to label the lines of latitude and longitude,
> but have not been able to figure out how to do this.
>   

use the label keyword to drawmeridians and drawparallels.

-Jeff
> Thanks!
>
> Phillip
>
> http://old.nabble.com/file/p27313185/mapdemo.py mapdemo.py 
> http://old.nabble.com/file/p27313185/mapdemo%2Bscreenshot.jpeg 
> http://old.nabble.com/file/p27313185/mapdemo.jpeg 
>
>   


-- 
Jeffrey S. Whitaker Phone  : (303)497-6313
Meteorologist   FAX: (303)497-6449
NOAA/OAR/PSD  R/PSD1Email  : jeffrey.s.whita...@noaa.gov
325 BroadwayOffice : Skaggs Research Cntr 1D-113
Boulder, CO, USA 80303-3328 Web: http://tinyurl.com/5telg


--
The Planet: dedicated and managed hosting, cloud storage, colocation
Stay online with enterprise data centers and the best network in the business
Choose flexible plans and management services without long-term contracts
Personal 24x7 support from experience hosting pros just a phone call away.
http://p.sf.net/sfu/theplanet-com
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


[Matplotlib-users] two issues with labels on maps

2010-01-25 Thread Dr. Phillip M. Feldman

The attached program generates a map and then saves it to a file.  I have two
problems with the result:

(1) Note that the screenshot shows a title above the map, while the .png
file that was saved by the program does not.

(2) I would like to be able to label the lines of latitude and longitude,
but have not been able to figure out how to do this.

Thanks!

Phillip

http://old.nabble.com/file/p27313185/mapdemo.py mapdemo.py 
http://old.nabble.com/file/p27313185/mapdemo%2Bscreenshot.jpeg 
http://old.nabble.com/file/p27313185/mapdemo.jpeg 

-- 
View this message in context: 
http://old.nabble.com/two-issues-with-labels-on-maps-tp27313185p27313185.html
Sent from the matplotlib - users mailing list archive at Nabble.com.


--
The Planet: dedicated and managed hosting, cloud storage, colocation
Stay online with enterprise data centers and the best network in the business
Choose flexible plans and management services without long-term contracts
Personal 24x7 support from experience hosting pros just a phone call away.
http://p.sf.net/sfu/theplanet-com
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] Interact with matplotlib in Sage

2010-01-25 Thread Jason Grout
Gökhan Sever wrote:
> Hello,
>
> I have thought of this might interesting to share. Register at
> www.sagenb.org or try on your local Sage-notebook and using the following
> code:
>   
>

A related example that lets you get the actual matplotlib figure from a 
Sage graphic and play with it is here:

http://sagenb.org/home/pub/1413/

The thing we'd like to do now is be able to wrap matplotlib axes with 
Sage Graphics objects (so someone can construct a matplotlib object and 
then wrap it in a Sage Graphics instance to then do further stuff with 
it in Sage).  However, I think we need to resolve the issues involving 
taking the axes from one figure and adding them to another figure; these 
issues were brought up on the mailing list a while ago.

Thanks,

Jason

--
Jason Grout
jason.gr...@drake.edu




--
The Planet: dedicated and managed hosting, cloud storage, colocation
Stay online with enterprise data centers and the best network in the business
Choose flexible plans and management services without long-term contracts
Personal 24x7 support from experience hosting pros just a phone call away.
http://p.sf.net/sfu/theplanet-com
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] accented characters

2010-01-25 Thread Michael Droettboom
Yes.  Unicode strings can be used for text.  See this example:

http://matplotlib.sourceforge.net/examples/pylab_examples/unicode_demo.html

(There are some caveats about using characters outside of the BMP, but 
that doesn't affect most people.)

Mike

Filipe Pires Alvarenga Fernandes wrote:
> Does matplotlib support accented characters without the TeX mathtext?
>
> Thanks.
>
> *
> Filipe Pires Alvarenga Fernandes
>
> University of Massachusetts Dartmouth
> 200 Mill Road - Fairhaven, MA
> Tel: (508) 910-6381
> Email: falvarengafernan...@umassd.edu 
> 
>  ocef...@yahoo.com.br 
>  ocef...@gmail.com 
>
> http://ocefpaf.tiddlyspot.com/
> *
> 
>
> --
> The Planet: dedicated and managed hosting, cloud storage, colocation
> Stay online with enterprise data centers and the best network in the business
> Choose flexible plans and management services without long-term contracts
> Personal 24x7 support from experience hosting pros just a phone call away.
> http://p.sf.net/sfu/theplanet-com
> 
>
> ___
> Matplotlib-users mailing list
> Matplotlib-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
>   

-- 
Michael Droettboom
Science Software Branch
Operations and Engineering Division
Space Telescope Science Institute
Operated by AURA for NASA


--
The Planet: dedicated and managed hosting, cloud storage, colocation
Stay online with enterprise data centers and the best network in the business
Choose flexible plans and management services without long-term contracts
Personal 24x7 support from experience hosting pros just a phone call away.
http://p.sf.net/sfu/theplanet-com
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


[Matplotlib-users] accented characters

2010-01-25 Thread Filipe Pires Alvarenga Fernandes
Does matplotlib support accented characters without the TeX mathtext?

Thanks.

*
Filipe Pires Alvarenga Fernandes

University of Massachusetts Dartmouth
200 Mill Road - Fairhaven, MA
Tel: (508) 910-6381
Email: falvarengafernan...@umassd.edu
 ocef...@yahoo.com.br
 ocef...@gmail.com

http://ocefpaf.tiddlyspot.com/
*
--
The Planet: dedicated and managed hosting, cloud storage, colocation
Stay online with enterprise data centers and the best network in the business
Choose flexible plans and management services without long-term contracts
Personal 24x7 support from experience hosting pros just a phone call away.
http://p.sf.net/sfu/theplanet-com___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] Assigning "k" key for xscaling

2010-01-25 Thread Gökhan Sever
Constrain pan/zoom to x axis hold *x* Constrain pan/zoom to y axis hold *y*
I don't have these in my backend_bases.py file. Are these working on your
system?

On Mon, Jan 25, 2010 at 12:58 PM, Gökhan Sever wrote:

> Hello,
>
> I could these keys into rcsetup.py file as well as matplotlibrc.template
> and update backend_bases.py accordingly. And add some documentation
> reflecting
> the changes made.
>
> # Event keys to interact with figures/plots via keyboard
>
> fullscreen : 'f'
> home : 'h'
> reset : 'r'
> back : 'c'
> forward : 'v'
> pan : 'p'
> zoom : 'o'
> save : 's'
> grid : 'g'
> yscale : 'l'
> xscale : 'k'
>
>
> *Notes:*
>
> Matthias, leaving values as empty will remove the key short-cut.
>
> Don't understand exactly what 'a' does?
>
> f doesn't toggle full-screen --using qt4agg backend.
>
> There are a couple function duplicates. (eg. back with 'c' and left and
> backspace keys. How can represent them? Create a list inside the
> dictionary?
> back = ['c', 'left', 'backspace']
>
> 'o' seems like unnecessary. Since you have to select an area using mouse.
>
> 's' doesn't behave correctly here. Shouldn't it bring the save dialog?
> Instead I am getting:
> TypeError: save_figure() takes exactly 1 argument (2 given)
>
>
>
> On Mon, Jan 25, 2010 at 8:32 AM, Matthias Michler  > wrote:
>
>> Hi Gökhan,
>>
>> I just wanted to discuss the key, because I think this patch should be
>> part of
>> matplotlib and not only of individual users. I think it is worth be be
>> added
>> to the mpl-tracker at http://sourceforge.net/tracker/?group_id=80706 or
>> maybe
>> one of the developers has the time to commit this small change?
>>
>> I think your idea about key-mappings in the matplotlib-rc is a good option
>> to
>> customize keyboard short cuts and even remove short-cuts which aren't of
>> intrest for the individual user. Furthermore the latter yields space for
>> keyboard shortcuts, which are used in one's own program.
>>
>> Kind regards,
>> Matthias
>>
>> On Friday 22 January 2010 16:57:22 Gökhan Sever wrote:
>> > It is very simple to change key-assignment. Take a look at the
>> > backend_bases.py code (search for event.key instances) :
>> >
>> > elif event.key == 'L':
>> >
>> > I was thinking to move y-scaling to "y" and x-scaling to "x" but x and y
>> > are assigned to something else (
>> > http://matplotlib.sourceforge.net/users/navigation_toolbar.html)
>> >
>> > For me toggling "k" is simpler for me than doing Shift-L.
>> >
>> > Maybe these options could be provided in the matplotlibrc file. Users
>> can
>> > make their key mapping based on their choice. That requires some more
>> > coding
>> >
>> > :)
>> >
>> > On Fri, Jan 22, 2010 at 1:59 AM, Matthias Michler
>> >
>> > wrote:
>> > > Hi Gökhan, Hi list members,
>> > >
>> > > This is really a missing feature in matplotlib in my opinion and it's
>> > > great that you took the time to make an suggestion, but I would prefer
>> > > capital "L"
>> > > for the xaxis-scaling like gnuplot although I'm not sure this is
>> > > possible.
>> > >
>> > > What do you and other list members think about that?
>> > >
>> > > Kind regards,
>> > > Matthias
>> > >
>> > > On Thursday 21 January 2010 19:45:37 Gökhan Sever wrote:
>> > > > Hello,
>> > > >
>> > > > "l" key does the log - linear scaling for y-axis. I have made a
>> minor
>> > > > change to use "k" for x-axis scaling.
>> > > >
>> > > > Patch added. Feel free to add if you find it useful.
>>
>>
>>
>> --
>> Throughout its 18-year history, RSA Conference consistently attracts the
>> world's best and brightest in the field, creating opportunities for
>> Conference
>> attendees to learn about information security's most important issues
>> through
>> interactions with peers, luminaries and emerging and established
>> companies.
>> http://p.sf.net/sfu/rsaconf-dev2dev
>> ___
>> Matplotlib-users mailing list
>> Matplotlib-users@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
>>
>
>
>
> --
> Gökhan
>



-- 
Gökhan
--
The Planet: dedicated and managed hosting, cloud storage, colocation
Stay online with enterprise data centers and the best network in the business
Choose flexible plans and management services without long-term contracts
Personal 24x7 support from experience hosting pros just a phone call away.
http://p.sf.net/sfu/theplanet-com___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] Assigning "k" key for xscaling

2010-01-25 Thread Gökhan Sever
Hello,

I could these keys into rcsetup.py file as well as matplotlibrc.template
and update backend_bases.py accordingly. And add some documentation
reflecting
the changes made.

# Event keys to interact with figures/plots via keyboard

fullscreen : 'f'
home : 'h'
reset : 'r'
back : 'c'
forward : 'v'
pan : 'p'
zoom : 'o'
save : 's'
grid : 'g'
yscale : 'l'
xscale : 'k'


*Notes:*

Matthias, leaving values as empty will remove the key short-cut.

Don't understand exactly what 'a' does?

f doesn't toggle full-screen --using qt4agg backend.

There are a couple function duplicates. (eg. back with 'c' and left and
backspace keys. How can represent them? Create a list inside the dictionary?
back = ['c', 'left', 'backspace']

'o' seems like unnecessary. Since you have to select an area using mouse.

's' doesn't behave correctly here. Shouldn't it bring the save dialog?
Instead I am getting:
TypeError: save_figure() takes exactly 1 argument (2 given)


On Mon, Jan 25, 2010 at 8:32 AM, Matthias Michler
wrote:

> Hi Gökhan,
>
> I just wanted to discuss the key, because I think this patch should be part
> of
> matplotlib and not only of individual users. I think it is worth be be
> added
> to the mpl-tracker at http://sourceforge.net/tracker/?group_id=80706 or
> maybe
> one of the developers has the time to commit this small change?
>
> I think your idea about key-mappings in the matplotlib-rc is a good option
> to
> customize keyboard short cuts and even remove short-cuts which aren't of
> intrest for the individual user. Furthermore the latter yields space for
> keyboard shortcuts, which are used in one's own program.
>
> Kind regards,
> Matthias
>
> On Friday 22 January 2010 16:57:22 Gökhan Sever wrote:
> > It is very simple to change key-assignment. Take a look at the
> > backend_bases.py code (search for event.key instances) :
> >
> > elif event.key == 'L':
> >
> > I was thinking to move y-scaling to "y" and x-scaling to "x" but x and y
> > are assigned to something else (
> > http://matplotlib.sourceforge.net/users/navigation_toolbar.html)
> >
> > For me toggling "k" is simpler for me than doing Shift-L.
> >
> > Maybe these options could be provided in the matplotlibrc file. Users can
> > make their key mapping based on their choice. That requires some more
> > coding
> >
> > :)
> >
> > On Fri, Jan 22, 2010 at 1:59 AM, Matthias Michler
> >
> > wrote:
> > > Hi Gökhan, Hi list members,
> > >
> > > This is really a missing feature in matplotlib in my opinion and it's
> > > great that you took the time to make an suggestion, but I would prefer
> > > capital "L"
> > > for the xaxis-scaling like gnuplot although I'm not sure this is
> > > possible.
> > >
> > > What do you and other list members think about that?
> > >
> > > Kind regards,
> > > Matthias
> > >
> > > On Thursday 21 January 2010 19:45:37 Gökhan Sever wrote:
> > > > Hello,
> > > >
> > > > "l" key does the log - linear scaling for y-axis. I have made a minor
> > > > change to use "k" for x-axis scaling.
> > > >
> > > > Patch added. Feel free to add if you find it useful.
>
>
>
> --
> Throughout its 18-year history, RSA Conference consistently attracts the
> world's best and brightest in the field, creating opportunities for
> Conference
> attendees to learn about information security's most important issues
> through
> interactions with peers, luminaries and emerging and established companies.
> http://p.sf.net/sfu/rsaconf-dev2dev
> ___
> Matplotlib-users mailing list
> Matplotlib-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
>



-- 
Gökhan
--
The Planet: dedicated and managed hosting, cloud storage, colocation
Stay online with enterprise data centers and the best network in the business
Choose flexible plans and management services without long-term contracts
Personal 24x7 support from experience hosting pros just a phone call away.
http://p.sf.net/sfu/theplanet-com___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] Adding watermark to canvas background

2010-01-25 Thread Jae-Joon Lee
On Mon, Jan 25, 2010 at 9:14 AM, Dimitri Linten
 wrote:
> What is the best way to do this ?

Please explain what you want and what your issue is.
Do not expect us (developers or other users) to study your code. If
possible, post a small stand-alone example that others can simply run.

As far as the watermark is concerned, the easiest way is to use
figimage as John suggested, but apparently this is not what you want.
The svn version of matplotlib has OffsetImage and AnnotationBox, which
could be helpful.

Regards,

-JJ

--
Throughout its 18-year history, RSA Conference consistently attracts the
world's best and brightest in the field, creating opportunities for Conference
attendees to learn about information security's most important issues through
interactions with peers, luminaries and emerging and established companies.
http://p.sf.net/sfu/rsaconf-dev2dev
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] Adding watermark to canvas background

2010-01-25 Thread Dimitri Linten
Dear John,

Thank you for your reply, however am looking for a watermark to be plotted
inside the axis, not behind the axis

Regards,

Dimitri

On Mon, Jan 25, 2010 at 3:58 PM, John Hunter  wrote:

> On Mon, Jan 25, 2010 at 8:14 AM, Dimitri Linten
>  wrote:
> > Hi Forum,
> > I am using matplotlib in a PyQt4 App.
> > I wanted to add a watermark-type  pictures to the standard white
> background
> > of the canvas.
>
> Does the following help?
>
> http://matplotlib.sourceforge.net/search.html?q=codex+watermark
>
--
Throughout its 18-year history, RSA Conference consistently attracts the
world's best and brightest in the field, creating opportunities for Conference
attendees to learn about information security's most important issues through
interactions with peers, luminaries and emerging and established companies.
http://p.sf.net/sfu/rsaconf-dev2dev___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] Adding watermark to canvas background

2010-01-25 Thread John Hunter
On Mon, Jan 25, 2010 at 8:14 AM, Dimitri Linten
 wrote:
> Hi Forum,
> I am using matplotlib in a PyQt4 App.
> I wanted to add a watermark-type  pictures to the standard white background
> of the canvas.

Does the following help?

http://matplotlib.sourceforge.net/search.html?q=codex+watermark

--
Throughout its 18-year history, RSA Conference consistently attracts the
world's best and brightest in the field, creating opportunities for Conference
attendees to learn about information security's most important issues through
interactions with peers, luminaries and emerging and established companies.
http://p.sf.net/sfu/rsaconf-dev2dev
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] Assigning "k" key for xscaling

2010-01-25 Thread Matthias Michler
Hi Gökhan,

I just wanted to discuss the key, because I think this patch should be part of 
matplotlib and not only of individual users. I think it is worth be be added 
to the mpl-tracker at http://sourceforge.net/tracker/?group_id=80706 or maybe 
one of the developers has the time to commit this small change?

I think your idea about key-mappings in the matplotlib-rc is a good option to 
customize keyboard short cuts and even remove short-cuts which aren't of 
intrest for the individual user. Furthermore the latter yields space for 
keyboard shortcuts, which are used in one's own program.

Kind regards,
Matthias

On Friday 22 January 2010 16:57:22 Gökhan Sever wrote:
> It is very simple to change key-assignment. Take a look at the
> backend_bases.py code (search for event.key instances) :
>
> elif event.key == 'L':
>
> I was thinking to move y-scaling to "y" and x-scaling to "x" but x and y
> are assigned to something else (
> http://matplotlib.sourceforge.net/users/navigation_toolbar.html)
>
> For me toggling "k" is simpler for me than doing Shift-L.
>
> Maybe these options could be provided in the matplotlibrc file. Users can
> make their key mapping based on their choice. That requires some more
> coding
>
> :)
>
> On Fri, Jan 22, 2010 at 1:59 AM, Matthias Michler
>
> wrote:
> > Hi Gökhan, Hi list members,
> >
> > This is really a missing feature in matplotlib in my opinion and it's
> > great that you took the time to make an suggestion, but I would prefer
> > capital "L"
> > for the xaxis-scaling like gnuplot although I'm not sure this is
> > possible.
> >
> > What do you and other list members think about that?
> >
> > Kind regards,
> > Matthias
> >
> > On Thursday 21 January 2010 19:45:37 Gökhan Sever wrote:
> > > Hello,
> > >
> > > "l" key does the log - linear scaling for y-axis. I have made a minor
> > > change to use "k" for x-axis scaling.
> > >
> > > Patch added. Feel free to add if you find it useful.


--
Throughout its 18-year history, RSA Conference consistently attracts the
world's best and brightest in the field, creating opportunities for Conference
attendees to learn about information security's most important issues through
interactions with peers, luminaries and emerging and established companies.
http://p.sf.net/sfu/rsaconf-dev2dev
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


[Matplotlib-users] Adding watermark to canvas background

2010-01-25 Thread Dimitri Linten
Hi Forum,

I am using matplotlib in a PyQt4 App.

I wanted to add a watermark-type  pictures to the standard white background
of the canvas.

My current version of this is :

def getwatermark(self):
factor=1.0  #factor for scaling image
im1=QtGui.QPixmap(':/watermark.png')
im=im1.toImage()
self.watermark_ratio=(im.height()/factor)/(im.width()/factor)
ival0=[]
for i in range(im.width()):#range(2): #range(im.width()):
for j in range(im.height()):#range(3): #range(im.height()):
if int(im.pixel(i,j))==0:
  ival0.append(43)
else:
 ival0.append(40)
self.watermark=reshape(ival0,(im.width(),im.height()))

def placewatermark(self,canvas,axes):

try:
if self.version=='1':
grayfactor=24 #factor for grayscale
canvassize=canvas.size()
if canvas.__class__.__name__=='MyPFCanvas':

 #for PF, the IV canvas is split in two figures...
bottom=self.IVTab.IVcanvas.vert[0]._scalable_size
spacing=self.IVTab.IVcanvas.vert[1]._scalable_size
top=self.IVTab.IVcanvas.vert[2]._scalable_size
correctionY=top/(top+spacing+bottom)
else:
correctionY=1

origaxes=axes.axis()

xrange=origaxes[1]-origaxes[0]
yrange=origaxes[3]-origaxes[2]
xcanvas=canvassize.width()
ycanvas=canvassize.height()*correctionY

if (xcanvas/float(ycanvas))>self.watermark_ratio:
yfig=yrange
centery=origaxes[2]
xfig=self.watermark_ratio*yrange

 xfig=(yfig*self.watermark_ratio)*(xrange/yrange)*(ycanvas/float(xcanvas))
centerx=origaxes[0]+(xrange-xfig)/2
else:
xfig=xrange
centerx=origaxes[0]

 yfig=(xfig/self.watermark_ratio)*(yrange/xrange)/(ycanvas/float(xcanvas))
centery=origaxes[2]+(yrange-yfig)/2


 
axes.imshow(self.watermark,origin='lower',extent=(centerx,centerx+xfig,centery,centery+yfig),vmin=0,vmax=43,cmap=cm.gray)
 #,extent=(centerx,centerx+xfig,centery,centery+yfig),,

axes.axis('auto')
axes.axis(origaxes)

canvas.draw()
except:
##print "no watermark placeD"
pass





What is the best way to do this ?

Regards,

Dimitri
--
Throughout its 18-year history, RSA Conference consistently attracts the
world's best and brightest in the field, creating opportunities for Conference
attendees to learn about information security's most important issues through
interactions with peers, luminaries and emerging and established companies.
http://p.sf.net/sfu/rsaconf-dev2dev___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] Newb question - multiple colors in bar chart

2010-01-25 Thread Matthias Michler
Hi Jeff,

you can do something like the following and specify the color for each bar by 
providing a list of colors for the keyword argument 'color'.

import numpy as np
import matplotlib.pyplot as plt

# generate some data
left = np.arange(6)
height = np.random.uniform(size=6)
# plot 3 blue and 3 red bars:
plt.bar(left, height, color=['blue']*3+ ['red']*3)
plt.show()

You second way could be provided by the color list

['red', '0.5']*3 = ['red', '0.5', 'red', '0.5', 'red', '0.5']

Kind regards,
Matthias

On Saturday 23 January 2010 16:36:36 Jeff Layton wrote:
> Good morning,
>
> I hate to ask such a newbie question but I am a newb with matplotlib :)
>
> I want to create a bar chart with, for example, 6 "bars". I want the first
> 3 bars to be one color and the second 3 bars to be another color. I'm
> not entirely sure how to do this - any suggestions?
>
> Alternatively, I would like to create 6 bars where every other bar is
> a different color. For example, gray, red, gray, red, gray, red. Any
> suggestions on this?
>
> TIA!
>
> Jeff

--
Throughout its 18-year history, RSA Conference consistently attracts the
world's best and brightest in the field, creating opportunities for Conference
attendees to learn about information security's most important issues through
interactions with peers, luminaries and emerging and established companies.
http://p.sf.net/sfu/rsaconf-dev2dev
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users