[Matplotlib-users] axes.hist gets fooled by intermixed colors as strings and RGB

2012-02-05 Thread Martin Mokrejs
HI, I have troubles getting to wirk a hitogram plot. I have colors in RGB as tuples of 3 values and also some colors defined as string, e.g. 'orange'. I get the folowing error: File "/usr/lib64/python2.7/site-packages/matplotlib/pyplot.py", line 2332, in hist ret = ax.hist(x, bins, range,

[Matplotlib-users] How to make a colored bar chart with named items and values shown above each bar?

2012-02-07 Thread Martin Mokrejs
Hi, I would like to create a bar chart like the attached example but with the addition that each bar would have a different color. I tried to learn this from the examples on matplotlib web but still do not see a close example for that. ;-) many thanks, Martin <>-

[Matplotlib-users] _RendererAgg(int(width), int(height), dpi, debug=False): ValueError: width and height must each be below 32768

2012-02-14 Thread Martin Mokrejs
Hi, the below code works for me but in case there are few values to be rendered it chokes (I think this is the culprit or maybe one of the values isn't unique in those input lists?): pylab.clf() if longlegends: F.set_size_inches( (DefaultSize[0], DefaultSize[1]*2.5) ) _e =

Re: [Matplotlib-users] _RendererAgg(int(width), int(height), dpi, debug=False): ValueError: width and height must each be below 32768

2012-02-14 Thread Martin Mokrejs
window from the shell ACCEPTS: a w,h tuple with w,h in inches Nope, it does not work. The print call gives me: [ 8. 6.]. So, this is not a tuple? Or python-2.7 issue how is it printed ... I fear? ;-) Anyway, doing F.set_size_inches(11.2, 15) works for me. Martin Martin Mokrejs wrote

Re: [Matplotlib-users] _RendererAgg(int(width), int(height), dpi, debug=False): ValueError: width and height must each be below 32768

2012-02-16 Thread Martin Mokrejs
Hi Benjamin, thank you for you explanation. My comment is below in the text: Benjamin Root wrote: > > > On Tue, Feb 14, 2012 at 4:43 PM, Martin Mokrejs <mailto:mmokr...@fold.natur.cuni.cz>> wrote: > > Ah, this seems to be the issue that my figsize was growi

Re: [Matplotlib-users] _RendererAgg(int(width), int(height), dpi, debug=False): ValueError: width and height must each be below 32768

2012-02-16 Thread Martin Mokrejs
Benjamin Root wrote: > > > On Thu, Feb 16, 2012 at 3:09 PM, Martin Mokrejs <mailto:mmokr...@fold.natur.cuni.cz>> wrote: > > Hi Benjamin, > thank you for you explanation. My comment is below in the text: > > Benjamin Root wrote: > > > &g

[Matplotlib-users] Escaping in matplotlib.font_manager.findfont('sans\\-serif')

2012-03-26 Thread Martin Mokrejs
Hi, I wondered why the matplotlib.font_manager.rcParams contains sometimes escaped minus signs in font names: >>> font_manager.rcParams['mathtext.sf'] 'sans\\-serif' >>> >>> font_manager.findfont('sans-serif') Traceback (most recent call last): File "", line 1, in File "/usr/lib64/python2.

Re: [Matplotlib-users] Escaping in matplotlib.font_manager.findfont('sans\\-serif')

2012-03-27 Thread Martin Mokrejs
ext])) '/usr/share/fonts/mathematica-fonts/Vera.ttf' >>> font_manager.findfont('monospace') '/usr/share/fonts/mathematica-fonts/VeraMono.ttf' >>> font_manager.findfont('sans-serif') Traceback (most recent call last): File "", line

[Matplotlib-users] Improve the error message or introduce support for colors as RGS tuples

2012-04-13 Thread Martin Mokrejs
Hi, I am trying to improve my code where I cannot find out why matplotlib-1.1.0 does not support colors specified as RG tuples. Here is an example. import numpy as np import matplotlib.pyplot as plt _nums = [160.0, 160.0, 160.0, 95.0, 160.0, 160.0] _colors = [(0.5019607843137255, 0.0, 0.5019

Re: [Matplotlib-users] Improve the error message or introduce support for colors as RGS tuples

2012-04-13 Thread Martin Mokrejs
Martin Mokrejs wrote: > Hi, > I am trying to improve my code where I cannot find out why matplotlib-1.1.0 > does not > support colors specified as RG tuples. Here is an example. > > > > import numpy as np > import matplotlib.pyplot as plt > > _nums =

[Matplotlib-users] matplotlib requires write perms and space in $HOME

2012-06-18 Thread Martin Mokrejs
Hi, I am running some script in /mnt/blah and while my $HOME disk on a different device filled up because of some other reason. But my script ran in /mnt/blah died as well while there is plenty of space. Here is the stacktrace. import matplotlib File "/usr/lib64/python2.7/site-packages/m

Re: [Matplotlib-users] matplotlib requires write perms and space in $HOME

2012-06-18 Thread Martin Mokrejs
John Hunter wrote: > > > > > On Jun 18, 2012, at 6:19 AM, Martin Mokrejs > wrote: > >> Hi, >> I am running some script in /mnt/blah and while my $HOME disk on a >> different device filled up >> because of some other reason. But my script ran

[Matplotlib-users] A pie chart with rotated text labels

2012-09-24 Thread Martin Mokrejs
Hi, I have pie charts with relatively long texts assigned to each slice of the pie. The text is drawn horizontally. Instead, I would like to have it rotated at the same angle as the slice itself (i.e. centered at the "axis" of the slice). In this way the text would not overlap other text of adj

Re: [Matplotlib-users] A pie chart with rotated text labels

2012-09-24 Thread Martin Mokrejs
Hi Ben, Benjamin Root wrote: > > > On Monday, September 24, 2012, Martin Mokrejs wrote: > > Hi, > I have pie charts with relatively long texts assigned to each slice of > the pie. > The text is drawn horizontally. Instead, I would like to have it rota

Re: [Matplotlib-users] matplotlib-1.2.0: regression in histogram with barstacked drawing?

2013-01-17 Thread Martin Mokrejs
Hi Ben, thank you, I don't think I managed to upload the figures attached to the email, but at least, the "issue" is opened: https://github.com/matplotlib/matplotlib/issues/1679 Thanks, Martin Benjamin Root wrote: > > > On Sat, Dec 29, 2012 at 4:41 PM, Marti

Re: [Matplotlib-users] Making space for a long legend outside of a barchart

2013-05-22 Thread Martin Mokrejs
e image only vertically. An optional argument like: fig.savefig('foobar.png', bbox_inches='tight', keep_fig_width=True) would maybe do the job for me. What I still don't understand what is resizing the image in tight_layout. It doesn't seem to me that just

Re: [Matplotlib-users] Making space for a long legend outside of a barchart

2013-05-22 Thread Martin Mokrejs
t_layout rescaling issue and the "feature request". ;-) Maritn > > probably this is quite stupid. > > cheers, > > Chao > > On Wed, May 22, 2013 at 1:03 PM, Martin Mokrejs [via matplotlib] <[hidden > email] > wrote: > > Hi Chao, > >

[Matplotlib-users] scatter_hist.py: broken Example on MPL website

2013-05-23 Thread Martin Mokrejs
Hi, I just hit a broken example at http://matplotlib.org/examples/pylab_examples/scatter_hist.html?highlight=scatter $ python scatter_hist.py Traceback (most recent call last): File "scatter_hist.py", line 44, in axHisty.hist(y, bins=bins, orientation='horizontal') File "/usr/lib64/pyt

Re: [Matplotlib-users] Making space for a long legend outside of a barchart

2013-05-23 Thread Martin Mokrejs
t; understanding (maybe I am wrong!). legend and > hist are all matplotlib.axes.Axes method. > > Also, I think it's unrealistic to ask the figure do a nice job for you if > there are 50 legned handlers and you want to show > them in 2 columns wit

Re: [Matplotlib-users] [Patch] Patch for fontmanager crash

2013-07-08 Thread Martin Mokrejs
Nicolas Mailhot wrote: > Hi, > > In matplotlib 1.2.1, the get_name function is not garding against none > self (unlike other functions); Unfortunately it seems I have a workload > that makes matplotlib call get_name with None (wasn't the case in 1.2.0). > I couldn't isolate the exact trigger, whe

Re: [Matplotlib-users] [Patch] Patch for fontmanager crash

2013-07-09 Thread Martin Mokrejs
Hi Nicolas, Nicolas Mailhot wrote: > > Le Mar 9 juillet 2013 15:14, Nicolas Mailhot a écrit : >> >> Le Lun 8 juillet 2013 18:18, Martin Mokrejs a écrit : > >>> Could you instead just test for "if not self._family"? Tests for >>> equality >&g

[Matplotlib-users] mpl-1.2.1: Speedup code by removing .startswith() calls and some for loops

2013-08-09 Thread Martin Mokrejs
[re-sending with also the 3rd patch file, sorry] Hi, I am drawing some barcharts and scatter plot and the speed for rendering is awful once you have 100 000 of dots. I ran python profiler which lead me to .startswith() calls and some for loops which append do a list repeatedly. This parts coul

[Matplotlib-users] mpl-1.2.1: Speedup code by removing .startswith() calls and some for loops

2013-08-09 Thread Martin Mokrejs
Hi, I am drawing some barcharts and scatter plot and the speed for rendering is awful once you have 100 000 of dots. I ran python profiler which lead me to .startswith() calls and some for loops which append do a list repeatedly. This parts could be still sped up I think but a first attempt is

Re: [Matplotlib-users] mpl-1.2.1: Speedup code by removing .startswith() calls and some for loops

2013-08-09 Thread Martin Mokrejs
:( > > Thanks! I am sorry but I just don't have time to fiddle with github. It is just awkward. I even failed to download diffs of the changes from https://github.com/matplotlib/matplotlib/pull/2156/commits. I rather continue studying runsnake output. ;-) Martin > > Phil >

Re: [Matplotlib-users] mpl-1.2.1: Speedup code by removing .startswith() calls and some for loops

2013-08-09 Thread Martin Mokrejs
er hot spot is setp() artist.py, actually its get_aliases() on line 817, which again leads to getattr() and callable(). The problem is there are millions of their calls. So, once again, my all my patches attached (figure.py.patch artist.py.patch have changed). Martin Benjamin Root wrote: >

Re: [Matplotlib-users] How can I put a white area in the middle of colorbar showing the masked data?

2014-03-03 Thread Martin Mokrejs
Maybe I understand what he means. How can a user override some value in a colormap? Lets say, in general user wants to inherit some ready made colormap but in addition wants to force certain colors to some data items. M. Eric Firing wrote: > On 2014/03/02 1:02 AM, ChaoYue wrote: >> Dear Eric, >> >