Re: [Matplotlib-users] Call for new style defaults

2015-07-12 Thread Pierre Haessig
Le 12/07/2015 18:11, Thomas Caswell a écrit : > I recommend everyone watch Nathaniel Smith and Stéfan van der Walt's > talk from SciPy2015 introducing the new color map and providing an > introduction to the math of color > perception: https://www.youtube.com/watch?v=xAoljeRJ3lU Great presentati

Re: [Matplotlib-users] savefig and StringIO error on Python3

2014-11-03 Thread Pierre Haessig
Le 02/11/2014 09:34, Scott Lasley a écrit : > I wish I could say that it was because of a deep understanding of the inner > workings of matplotlib or a rock solid grasp of python 3's bytes vs strings, > but it wasn't. fig.savefig threw the "TypeError: string argument expected, > got 'bytes'" e

Re: [Matplotlib-users] Equivalent of d3's "step-after" interpolation?

2014-10-30 Thread Pierre Haessig
You might also be interested in http://stackoverflow.com/questions/15188005/linestyle-in-matplotlib-step-function which details the `drawstyle` parameters. It can be set to 'steps-post' for example. The only case I was not able to cover with this parameter are the fill_between plots, because th

Re: [Matplotlib-users] Using unregistered scales

2014-10-08 Thread Pierre Haessig
g/gist/pierre-haessig/7e3e6a818edeb6819708 It's actually a completely different idea, because I was doing a "logit" scale to get a good visualization of *tails* in a cumulated distribution plot. So I'm jumping on your thread in case anyone can give me some feedback on this idea. F

Re: [Matplotlib-users] Question about copy_from_bbox

2014-04-01 Thread Pierre Haessig
Hi Michka, I haven't practiced PyQt for some time, but I think I remember there is a common practice of using a "0 ms" timer to launch a function after the Gui setup. I've modified your gist here : https://gist.github.com/pierre-haessig/9909708 (for some reason the Github

[Matplotlib-users] pure Qt data visualization (not open source)

2014-03-28 Thread Pierre Haessig
Hi, I just ran across this new Qt "add-on" for data visualization : blog.qt.digia.com/blog/2014/03/26/qt-data-visualization-1-0-released/ It's a bit off-topic because I think there is not (yet?) a Python binding, but there is a demo video which is worth taking a look at. The video doesn't mention

Re: [Matplotlib-users] Changing figure background color (through rcparams?)

2014-03-26 Thread Pierre Haessig
Hi, True enough, I didn't tested in a Notebook, but now it seems to work as well: https://gist.github.com/pierre-haessig/9779940 http://nbviewer.ipython.org/gist/pierre-haessig/9779940 (just a test with mpl.rcParams['axes.facecolor'] = 'red') best, Pierre Le 25/03/

Re: [Matplotlib-users] Changing figure background color (through rcparams?)

2014-03-25 Thread Pierre Haessig
Hi, Le 20/03/2014 18:40, Adam Hughes a écrit : > I am using an IPython notebook style that has a soft, yellow > background that I think is more appealing that white. When I make a > plot, I'd like the background of the plot (ie, everything that is > outside the x and y axis) to be the same color.

Re: [Matplotlib-users] Matplotlib for tiles - blank lines

2014-03-24 Thread Pierre Haessig
Hi, Le 24/03/2014 10:45, Jesper Larsen a écrit : > I am using matplotlib to produce plots (tiles) in a Web Map Service. > Unfortunately I cannot get Matplotlib to plot on the entire image. > There are one transparent (pixel) line at the bottom and one > transparent line at the right. This is of co

Re: [Matplotlib-users] imshow for .png- low resultion

2014-03-06 Thread Pierre Haessig
Le 05/03/2014 22:37, Asma Riyaz a écrit : > img= mpimg.imread('/home/asmariyaz/Desktop/mytree.png') > phyl_ax.imshow(img,interpolation='nearest') Ok, so here you could try replace 'nearest' by 'bilinear' or 'bicubic'. I believe those are the most common choices for image resampling (because

Re: [Matplotlib-users] imshow for .png- low resultion

2014-03-05 Thread Pierre Haessig
Hi Asma, Le 05/03/2014 21:19, Asma Riyaz a écrit : I am trying to merge a heat map(matplotlib) with a tree(.png), but the .png does not plot as needed or for that matter cannot be seen easily. Here is my code: ### CODE [] img = ht_ax.imshow(data, cmap=cmap, interpolation='none',vm

Re: [Matplotlib-users] reduce the number of ticks

2014-02-17 Thread Pierre Haessig
Le 17/02/2014 18:13, Eric Firing a écrit : >> > I was then wondering : >> > 1) is this solution recommended or not ? >> > 2) is there a shortcup to avoird the five "dots" ? > http://matplotlib.org/api/pyplot_api.html?highlight=locator_params#matplotlib.pyplot.locator_params > > This is both a pyplo

[Matplotlib-users] reduce the number of ticks

2014-02-17 Thread Pierre Haessig
Hi, In order to get a plot with a small number of ticks, it is possible to create a matplotlib.ticker.MaxNLocator object with a small value for `nbins`. However, I found it also possible to modify the existing AutoLocator instances, since AutoLocator derives from MaxNLocator : ax.xaxis.major.loc

Re: [Matplotlib-users] completely filling a figure canvas

2014-02-13 Thread Pierre Haessig
Hi Andreas, Le 14/02/2014 08:12, Andreas Hilboll a écrit : > Is there a way to have subplots_adjust() automatically chose left, > right, bottom, top values so that everything that's been drawn tightly > fits the figure? What about plt.tight_layout() ? (or fig.tight_layout ) best, Pierre <>-

Re: [Matplotlib-users] Interative legend manipulation?

2014-01-08 Thread Pierre Haessig
Le 07/01/2014 17:51, Paul Hobson a écrit : > I believe (as of v1.3.1) that after you create the legend you call > leg.draggable(True) I had never heard of that nice possibility! Would it make sense to add a few lines to the Legend Guide/Legend location ? http://matplotlib.org/users/legend_guide.ht

Re: [Matplotlib-users] Some help with PyQt

2013-08-30 Thread Pierre Haessig
Hi Eric, Le 29/08/2013 19:51, Eric Frederich a écrit : > I took the example that ships with 1.3.0 and have modified it to use a > grid layout and show 9 graphs in a 3x3 grid. > When I do this it, other widgets become rather unresponsive. > Is there a way to fix this? > Somehow offload whatever is

Re: [Matplotlib-users] RFE: dictionnary of figures

2013-08-04 Thread Pierre Haessig
Hi Frédéric, I don't understand what is the "dictionnary of figures" feature you are mentionning. Maybe you could write a short mockup script using it ? However, it's worth mentionning that you can use not only numbers in figures but also *strings*. >>> fig = plt.figure('crude oil price') I use

Re: [Matplotlib-users] major/minor grid settings in matplotlibrc

2013-06-03 Thread Pierre Haessig
Le 31/05/2013 13:15, Pierre Haessig a écrit : > Would it make sense to add also grid.major.* and grid.minor.* (as it > already exists for xticks) ? any feedback ? -- Pierre -- Get 100% visibility into Java/.NET cod

[Matplotlib-users] major/minor grid settings in matplotlibrc

2013-05-31 Thread Pierre Haessig
Hi, A friend was just asking me about how to set grid style in matplotlibrc to separate settings for minor and major grids. As far as I understand, it's not possible because the rc file only includes the following options : grid.color, grid.linestyle and grid.linewidth Would it make sense to add

Re: [Matplotlib-users] Add support for Smith charts

2013-05-14 Thread Pierre Haessig
Hi, Le 15/05/2013 00:14, Paul Stärke a écrit : Hello, I created a project for plotting nice Smith Charts with matplotlib. Those charts are super-good looking ! It's been a few years since I had heard that name, but now I remember a bit the few undergrad courses I got on HF electronics and tr

Re: [Matplotlib-users] cross correlation

2013-02-28 Thread Pierre Haessig
Hi, Le 27/02/2013 10:01, Sudheer Joseph a écrit : > I was checking the plt.xcorr and it calls the np.correlate in side it. > It calls np.correlate(ts1,ts2, mode=2). Just as a side note, mode=2 is the old fashioned way to specify mode='full' [1]. This may help in reading the numpy.correlate doc. T

Re: [Matplotlib-users] Unicode characters in PS output

2013-02-28 Thread Pierre Haessig
Hi Thomas, Le 27/02/2013 20:59, Thomas Sprinzing a écrit : > To sum it up: use the old 7-bit equivalent for the degree sign, not any > fancydancy UTF-8 character that is commonly not included in ye olde style > postscript standard font embedded into your laser printer wy back then in > the

Re: [Matplotlib-users] Unicode characters in PS output

2013-02-26 Thread Pierre Haessig
Le 26/02/2013 14:38, Gökhan Sever a écrit : > > Could you test my outputs if they look fine on your side? > > http://atmos.uwyo.edu/~gsever/data/matplotlib/test.pdf > > http://atmos.uwyo.edu/~gsever/data/matplotlib/test.ps >

Re: [Matplotlib-users] Unicode characters in PS output

2013-02-26 Thread Pierre Haessig
Hi, Le 26/02/2013 12:38, Gökhan Sever a écrit : > > fp = plt.figure(figsize=(8.5, 11)) > fp.text(0.5, 0.5, u"Temperature, \u00B0C", color='black', fontsize=16) > plt.savefig('test.ps ', papertype='letter') > plt.savefig('test.pdf', papertype='letter') > > Just a

Re: [Matplotlib-users] cross correlation

2013-02-21 Thread Pierre Haessig
Le 21/02/2013 17:33, Sudheer Joseph a écrit : > Thank you Pierre, > I will test the other options. I did not > know the number limitation in case of plt.xcorr. > Thanks a lot > with best regards, Just for reference : http://stackoverflow.com/questions/6991471/computin

Re: [Matplotlib-users] cross correlation

2013-02-21 Thread Pierre Haessig
Hi Sudheer, Le 21/02/2013 02:22, Sudheer Joseph a écrit : > Thank you very much Smith and Paul, > I was away from office due > to a medical situation. So could not respond and thank you regarding > the help. I have got the results now and the tips from bo

Re: [Matplotlib-users] filled step plot?

2013-01-28 Thread Pierre Haessig
Hi, Le 27/01/2013 00:35, Skipper Seabold a écrit : > This has been asked before, and I just filed a ticket [1]. Can anyone > think of a better way to do something like this? The fill_between > below is pretty suboptimal IMO. I feel that adding a filled step plot would indeed be useful. Just think

Re: [Matplotlib-users] Novice question: Am I using pyplot.rgrids correctly?

2012-12-18 Thread Pierre Haessig
Le 18/12/2012 11:13, Bob Dowling a écrit : > Any how, the answer seems to be "yes I'm using rgrids() correctly, but > no I'm not using matplotlib-friendly data points". I shall adjust my > values of (r,th). You don't need to change your (r,th) values. The two workarounds I see to get your "versi

Re: [Matplotlib-users] Novice question: Am I using pyplot.rgrids correctly?

2012-12-18 Thread Pierre Haessig
Hi Andre, Le 18/12/2012 06:52, Andre' Walker-Loud a écrit : > There is no mention in the docs about the treatment of negative "r". The > treatment is contrary to my expectations, and I would wager contrary to many > peoples expectations. So at a new minimum, at the very least, the docs > shou

Re: [Matplotlib-users] Novice question: Am I using pyplot.rgrids correctly?

2012-12-17 Thread Pierre Haessig
Le 17/12/2012 21:59, Pierre Haessig a écrit : > Maybe this the code behind the masking of half your curve, but I don't > know more. Looking closer at the plot, the curve is actually not masked ! Actually the "rmin functionality' is activated with rmin=-2*pi so that the whol

Re: [Matplotlib-users] Novice question: Am I using pyplot.rgrids correctly?

2012-12-17 Thread Pierre Haessig
Hi Bob, Le 17/12/2012 19:09, Bob Dowling a écrit : > > I am plotting a polar graph with some negative values of r. > Everything goes well until I try to use rgrids(). Am I doing > something wrong? I just noticed that calling rgrids *after* plotting works nicely for me: subplot(111, polar=True)

Re: [Matplotlib-users] Hiding axis

2012-12-04 Thread Pierre Haessig
Hi, Le 29/11/2012 20:42, Vilson Vieira a écrit : > I tried the no_clip function but it didn't worked: > https://gist.github.com/4171341 I just edited your file : https://gist.github.com/4203760 I made 2 changes: * added a call to random.seed to make you code reproductible. * altered the call t

Re: [Matplotlib-users] mailing list archive broken ?

2012-11-28 Thread Pierre Haessig
Hi Phil, Le 28/11/2012 12:58, Phil Elson a écrit : > I've just submitted a pull request > (https://github.com/matplotlib/matplotlib/pull/1540) to get the mpl > docs to link to the nabble archive instead > (http://matplotlib.1069221.n5.nabble.com/matplotlib-users-f3.html >

Re: [Matplotlib-users] dpi

2012-10-19 Thread Pierre Haessig
t4/html/qapplication.html#desktop http://qt-project.org/doc/qt-4.8/qapplication.html#desktop http://lists.trolltech.com/qt-interest/2008-08/thread00258-0.html Pierre Haessig — October 2012 """ import sys from PyQt4.QtGui import QApplication app = QApplication(sys.ar

Re: [Matplotlib-users] trouble switching off smoothing in imshow()

2012-10-09 Thread Pierre Haessig
Hi, Le 09/10/2012 16:37, Warren Weckesser a écrit : > > That's strange. `imshow(img, interpolation='nearest')` works for me. > I'm not sure I understand well the subtle difference between 'nearest' and 'none' interpolations, but I found in this commit https://github.com/jkseppan/matplotlib/commit

Re: [Matplotlib-users] XKCD style graphs?

2012-10-04 Thread Pierre Haessig
Le 04/10/2012 16:35, Pierre Haessig a écrit : > So I think this code indeed resamples the rastered plot image on a > shaken coordinate grid. I kind of understand that the noise on > coordinates is spatially smoothed by a 10px Gaussian Point Spread > Function (if I understand correc

Re: [Matplotlib-users] XKCD style graphs?

2012-10-04 Thread Pierre Haessig
Le 04/10/2012 16:54, Damon McDougall a écrit : > Adding Gaussian noise to each point on a function doesn't look nice. > That's why I produced a random function in Fourier space first. That > way, random functions still have some sense of smoothness. Mathematica code seems to use a Gaussian *smoothi

Re: [Matplotlib-users] XKCD style graphs?

2012-10-04 Thread Pierre Haessig
Le 04/10/2012 16:11, Michael Droettboom a écrit : > Yes -- this would be a great application for the path filtering > infrastructure that matplotlib has. Sounds way cooler than post-processing a raster plot image ! I'm not aware of this path filtering infrastructure. I guess it's a deeply buried

Re: [Matplotlib-users] XKCD style graphs?

2012-10-04 Thread Pierre Haessig
Le 04/10/2012 16:03, Jason Grout a écrit : > f@r means f(r) > > a~ImageConvolve~b means ImageConvolve(a,b) (~ treats an operator as infix) > > Table[..., {2}] means [... for i in range(2)] > > #+1& is a lambda function lambda x: x+1 > > So I think it goes something like: > > def xkcdDistort(p): >

Re: [Matplotlib-users] XKCD style graphs?

2012-10-04 Thread Pierre Haessig
Le 04/10/2012 14:29, Phil Elson a écrit : > Damon, I love the solution! I do wonder whether we could do some > quirky transform on the lines to achieve a similar result, rather than > manipulating the data before plotting it. The benefit is that > everything should then get randomly Xkcd-ed automat

Re: [Matplotlib-users] XKCD style graphs?

2012-10-04 Thread Pierre Haessig
Hi Fernando, Le 04/10/2012 09:16, Fernando Perez a écrit : > This would make for an awesome couple of examples for the gallery, the > mathematica solutions look really pretty cool: > > http://mathematica.stackexchange.com/questions/11350/xkcd-style-graphs I've never used Mathematica so that it's p

[Matplotlib-users] mailing list archive broken ?

2012-10-04 Thread Pierre Haessig
Hi, Is it just my web browser getting crazy or is there a real issue with the ML archive on sourceforge: http://sourceforge.net/mailarchive/forum.php?forum_name=matplotlib-users I only see email records until July 16th 2012 !! If there is another ML archive website in better shape, it would be w

Re: [Matplotlib-users] synchronization of ticks position in twinx plots

2012-09-26 Thread Pierre Haessig
Le 26/09/2012 15:30, Benjamin Root a écrit : > > Probably could have the two axes listen for an "xlim_changed" event, > check to see if it belongs to its twin, and update itself accordingly > (without emitting). I guess you mean "ylim_changed" event ? (Maybe my description was not very clear, but

Re: [Matplotlib-users] example of pareto chart

2012-09-26 Thread Pierre Haessig
Le 26/09/2012 15:25, Benjamin Root a écrit : > > Actually, if you are using the latest numpy (the 1.7 beta), that will > also not work unless you are using py3k or did "from __future__ import > division". Well, actually, using np.divide will always result in > integer division (this may or may not

[Matplotlib-users] synchronization of ticks position in twinx plots

2012-09-26 Thread Pierre Haessig
Hello, In relation to the recent thread on pareto chart, I have a question with regards to the synchronization of ticks location when using twinx plots. This question may have been adressed in the past, but my Google search on this topic was unfruitful. Sorry if this question was already answered.

Re: [Matplotlib-users] example of pareto chart

2012-09-26 Thread Pierre Haessig
Hi, Just a detail : Le 26/09/2012 04:29, Paul Tremblay a écrit : > percent = (np.divide(the_cumsum, the_sum)) * 100 This lines doesn't work on my computer (numpy 1.6.2) Indeed, there is a casting issue : In [2]: percent Out[2]: array([ 0, 0, 0, 0, 100]) However, using the regular "/" ope