Re: [Matplotlib-users] Matplotlib & Basemap / What is the Best Graphical Back-end for Raster Data Display (.png) ?

2016-03-03 Thread Jerzy Karczmarczuk
sation in principle, so why AGG? 2. Cairo uses its own engine. Why AGG? 3. Image (PNG) "production" from curves, etc. uses AntiGrain, but if imshow() shows an image which is just a pixel array, there is no manipulation needing AGG, an element (triple RGB) becomes a pixel, and t

Re: [Matplotlib-users] TypeError: can't multiply sequence by non-int of type 'float'

2015-09-28 Thread Jerzy Karczmarczuk
Le 28/09/2015 21:03, Benjamin Root a écrit : > Where does he multiply a list by a float? The traceback shows the > multiplication happening much further down in the draw stack. Look, Benjamin Root, I don't know, and I will not "investigate" where this operation happens. The diagnosis is a

Re: [Matplotlib-users] A request for a Matplotlib extension to hist

2015-04-24 Thread Jerzy Karczmarczuk
is hist(ogram). It computes the histogram (and eventually plots it). If it is already computed elsewhere, naming the procedure which JUST plots some bars a histogram is methodologically very dubious. Jerzy Karczmarczuk

Re: [Matplotlib-users] animation.FuncAnimation example --- how does it work?

2015-04-23 Thread Jerzy Karczmarczuk
the sources of Matplotlib from time to time. I do it regularly, it is nicely commented, and complements very well the documentation. Jerzy Karczmarczuk PS. Some blizzard around positional/keyword parameters in Python is quite persistent. Dive into Python of Mark Pilgrim covers this, and offers

Re: [Matplotlib-users] animation.FuncAnimation example --- how does it work?

2015-04-23 Thread Jerzy Karczmarczuk
(data) inside update. Jerzy Karczmarczuk -- BPM Camp - Free Virtual Workshop May 6th at 10am PDT/1PM EDT Develop your own process in accordance with the BPMN 2 standard Learn Process modeling best practices with Bonita BPM

Re: [Matplotlib-users] Best way to display image from URL in Python3

2015-03-20 Thread Jerzy Karczmarczuk
() # But as you can see, the Python 3 version requires the addition of BytesIO and read(). I take it that this is not supposed to be the case. It works for X.png, not for X.jpg. The call of imread() fails then. Tested also under 3.4/Anaconda. Jerzy Karczmarczuk

Re: [Matplotlib-users] Can not display 3D plot !

2014-11-12 Thread Jerzy Karczmarczuk
: Kernel died, restarting Perhaps it is your environment, not Matplotlib. A copy-paste of this program run without problems on my system. Anaconda 64 bits, IPython console (within Spyder). But *Windows 7*, not 8. Jerzy Karczmarczuk

Re: [Matplotlib-users] plot arbitrary 3D surface

2014-11-01 Thread Jerzy Karczmarczuk
Matplotlib doesn't offer (yet) any tools if I am not mistaken. Jerzy Karczmarczuk Caen, France. -- ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https

Re: [Matplotlib-users] plot arbitrary 3D surface

2014-11-01 Thread Jerzy Karczmarczuk
Le 01/11/2014 20:34, Benjamin Root a écrit : Actually, my response is still completely valid. You can only plot surfaces that can be represented parametrically in two dimensions. Find me a single plotting library that can do differently without having to get to this final step. 1. I did not

Re: [Matplotlib-users] get_xlim of dates

2014-09-16 Thread Jerzy Karczmarczuk
are integers. You have floats, and this probably is converted into fractions of a day / hour, etc. Read also something about timestamps. Regards. Jerzy Karczmarczuk -- Want excitement? Manually upgrade your production

Re: [Matplotlib-users] Entropy calculation incorrect?

2014-04-28 Thread Jerzy Karczmarczuk
logarithms, and in order to have the units appropriate for statistical physics / thermodynamics, we multiply the result by the Boltzmann constant, 1.38*10^(-23) Joule/Kelvin, and that's it. Anyway, Eric Firing is right, all this has nothing to do with Matplotlib. Best regards. Jerzy Karczmarczuk

Re: [Matplotlib-users] Intersecting polygons

2013-08-23 Thread Jerzy Karczmarczuk
luck. Jerzy Karczmarczuk PS. Try to convince the Dark Powers of the journal you send your work, that they modernize their processing and accept PDF. -- Introducing Performance Central, a new site from SourceForge

Re: [Matplotlib-users] Intersecting polygons

2013-08-22 Thread Jerzy Karczmarczuk
-transparent figure into a non-semitransparent figure that looks the same? I won't claim that this is an ultimate solution, but what I did a few times was to 1. Choose the svg backend, savefig the picture as svg. 2. Open in Inkscape and export as .eps. The result was satisfactory. Jerzy Karczmarczuk

Re: [Matplotlib-users] Evolution of the interface

2013-03-15 Thread Jerzy Karczmarczuk
() ? In general case this is not practical. The methods in Python called.through.the.dot.notation are there to stay, I think. Jerzy Karczmarczuk Caen, France. -- Everyone hates slow websites. So do we. Make your web apps

Re: [Matplotlib-users] bbox_inches='tight' from the navigation toolbar

2012-07-06 Thread Jerzy Karczmarczuk
. Adjust the position of your 'axes' rectangle, e. g. from pylab import * x=linspace(0,4*pi,500); y=sin(x) *axes([0.05,0.05,0.93,0.92])* plot(x,y); show() the details will depend on the size of your labels. == Jerzy Karczmarczuk

Re: [Matplotlib-users] y-axis misbehavior

2012-06-11 Thread Jerzy Karczmarczuk
plot gives x from 0 to 0.10, and y from -20.5 to 69. (The other: to 70). The tight_layout directive is used mainly when you have several subplots. Jerzy Karczmarczuk -- Live Security Virtual Conference Exclusive live

Re: [Matplotlib-users] pdf/eps export; dotted line plot shows random markers on the line

2012-06-09 Thread Jerzy Karczmarczuk
problem has probably nothing to do with matplotlib... Jerzy Karczmarczuk -- Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers

Re: [Matplotlib-users] How to draw a curve until it intersects another curve

2012-05-27 Thread Jerzy Karczmarczuk
the difference sign is good. Of course this will produce some bedlam if there are many intersections. You didn't say whether you want to plot the dashed curve entirely. If not, just truncate all three, the solid, the dashed and the abscissa, where the sign is OK. Good luck. Jerzy Karczmarczuk Caen

Re: [Matplotlib-users] matplotlibrc interpretation seems buggy : SORRY

2012-05-25 Thread Jerzy Karczmarczuk
I wrote: mpl.rcParams['lines.color'] = 'r' ... ...the line is still blue. BR answers: Plot() doesn't use lines.color. I don't remember the exact name, but it uses an rcparam for color cycling. Just change make the list of colors be just 'r'. [*!#!!%*!!] Of course I found

Re: [Matplotlib-users] Dark or inverted color scheme

2012-05-25 Thread Jerzy Karczmarczuk
Tony Yu: # rc definitions for dark backgrounds lines.color: white patch.edgecolor: white ... don't forget to lighten the colours in axes.color_cycle (unless blue on black, etc. suits you). This is used by plot and was one of my numerous mistakes two days ago... Jerzy Karczmarczuk

[Matplotlib-users] matplotlibrc interpretation under Windows seems buggy

2012-05-24 Thread Jerzy Karczmarczuk
. The dictionary rcParams contains the correct value 'lines.color': 'r' (Anyway, rcsetup.py validation doesn't protest. But then, the modified colour is ignored). Somebody could confirm that? The best. Jerzy Karczmarczuk Caen, France

Re: [Matplotlib-users] how to remove colorbar?

2012-05-21 Thread Jerzy Karczmarczuk
axes, the main, and the bar. The command fig.delaxes(fig.axes[1]) gets rid of the bar and the ticks. Is there anything wrong with that? Of course, I knew that fig.axes[1] was the bar, but finding it in a more complicated case should not be difficult. All the best. Jerzy Karczmarczuk

Re: [Matplotlib-users] Pick event

2012-05-13 Thread Jerzy Karczmarczuk
(13/05/2012 02:52), Arek Kędzior: What I am trying is to plot multiple discontinuous lines. I know that this approach does not work very well. How about using LineCollection. Put all curves into line collection Use Pick event to get line segment (what function to use ?) Once I have line

Re: [Matplotlib-users] basemap and fill_between()

2012-05-13 Thread Jerzy Karczmarczuk
Le 13/05/2012 11:34, David Craig a écrit : Hi, I'm having a problem usinf fill_between() with basemap. I plot two great circles and want to shade the region between them. My code is below, it doesnt give any error just creates the plot without filling the area. Does anyone know if it's

Re: [Matplotlib-users] basemap and fill_between()

2012-05-13 Thread Jerzy Karczmarczuk
Appendix. (and excuses for my approximate syntax in the first message; I was doing three things simultaneously). Maestro David Craig, your filling will be lousy anyway. If your x and y arrays come from linespace, you will surely get a triangle, and not the curvilinear area between GreatCircles.

Re: [Matplotlib-users] pick event

2012-05-12 Thread Jerzy Karczmarczuk
Arek Ke;dzior: I am trying to use pick event. ... What am I doing wrong ? Wrong with WHAT? What do you expect? Jerzy Karczmarczuk -- Live Security Virtual Conference Exclusive live event will cover all the ways

Re: [Matplotlib-users] pick event

2012-05-12 Thread Jerzy Karczmarczuk
at this point. Jerzy Karczmarczuk -- Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include

Re: [Matplotlib-users] Strange behaviour of scatter with single-column 2D array

2012-03-20 Thread Jerzy Karczmarczuk
the array attribute of the matrix : pl.scatter(B.A[:,0], B.A[:,1], c='b') //Here 'A' is the name of the attribute, nothing to do with your array A; by chance it is the same...// The best Jerzy Karczmarczuk -- This SF

Re: [Matplotlib-users] histogram and a line

2012-03-12 Thread Jerzy Karczmarczuk
in matplotlib, how to get into the plotted data, and to adjust the scales. Otherwise such problems will repeat. 6. Finally, in our civilized world people sign their messages. Anonymous letters are ugly. Jerzy Karczmarczuk

Re: [Matplotlib-users] Changing a single marker on a line

2012-03-08 Thread Jerzy Karczmarczuk
easier than anything else. But a true specialist might know The Real Magic... Jerzy Karczmarczuk -- Virtualization Cloud Management Using Capacity Planning Cloud computing makes use of virtualization - but cloud computing

Re: [Matplotlib-users] histogram and a line

2012-03-07 Thread Jerzy Karczmarczuk
, although your histogram is). In your real axes, the command plot([249,249],[0,height]) draws a vertical line (there is a primitive vert. line as well), what is the problem?? Jerzy Karczmarczuk -- Virtualization Cloud

Re: [Matplotlib-users] backend with edition capabilities

2012-03-01 Thread Jerzy Karczmarczuk
=linspace(0.0,25.0,300); y=sin(x) plot(x,y) and the figure is created without show(). Then, write: a=gca(); p=a.lines[0] and nothing more difficult than: p.set_lw(3); p.set_color('red'); draw() You have edited your line. No need to change the code of matplotlib. Good luck. Jerzy Karczmarczuk

Re: [Matplotlib-users] draw lines in basemap

2012-02-29 Thread Jerzy Karczmarczuk
in range(len(lons)): for j in range(len(lons)): if i == j: continue m.plot([x[i],y[i]],[x[j],y[j]],'k') I am not sure what do you really want, but perhaps replace the last cited line by: m.plot([x[i],x[j]],[y[i],y[j]],'k') == All the best. Jerzy Karczmarczuk Caen, France

Re: [Matplotlib-users] Matplotlib gallery

2012-02-23 Thread Jerzy Karczmarczuk
. Program-sources without comments are not so useful... == But I believe that this is just a start, and I am aware that to criticize is easier than to do something. (Je suis un grognon né, Nicolas, désolé...). So please, continue, my heart is with you! Jerzy Karczmarczuk Caen, France

Re: [Matplotlib-users] Enjoy all them spammers

2012-02-19 Thread Jerzy Karczmarczuk
I believe that the list owners will have to strenghten some tools to fight against all those shameless spammers. Jerzy Karczmarczuk -- Virtualization Cloud Management Using Capacity Planning Cloud computing makes use

Re: [Matplotlib-users] Ploting a sparse matrix with imshow

2012-02-19 Thread Jerzy Karczmarczuk
Jeff Whitakert : Jose Guzman: ... imshow(W, cmap=cm.binary) # W is a Numpy Array with shape (100,100) However, this does not work the way i would like (the ones appear very blur). I would need the correct representation of a grid where the possition 0,0 is simply the entry W[0,0] of my

Re: [Matplotlib-users] Dynamically adjusting the color scale in NonUniformImage

2012-02-18 Thread Jerzy Karczmarczuk
: im.set_clim(0,0.5) plt.gcf().canvas.draw() The colorbar changes scale, but the plot is untouched. Is that the expected behavior? Thanks, Ray Try, perhaps, after set_clim, to reinstall the data: im.set_data(x,y,z) plt.gcf().canvas.draw() = Jerzy Karczmarczuk

Re: [Matplotlib-users] Axes Scaling

2012-02-17 Thread Jerzy Karczmarczuk
precise, please. Jerzy Karczmarczuk -- Virtualization Cloud Management Using Capacity Planning Cloud computing makes use of virtualization - but cloud computing also focuses on allowing computing to be delivered as a service

Re: [Matplotlib-users] Visually equivalent contours/parallels

2012-02-17 Thread Jerzy Karczmarczuk
Andrea Gavana continues to struggle with his parallel lines: I managed to get *almost* there, but there still is a small glitch. I attach a self-evident sample, which generates data very similar to the real ones I have and shows the two parallel curves to the main one. You will notice that

Re: [Matplotlib-users] Fwd: Re: Colobar and change axis x and y labels

2012-02-16 Thread Jerzy Karczmarczuk
. Use the linear regression, find the zero of the gradient wrt (a,b,c) of SUM[(ax +by +c - z)^2] and that's all. The most tragic part of the exercise is the necessity of solving a linear equation set in 3 variables... Jerzy Karczmarczuk Caen, France

Re: [Matplotlib-users] svg in plot

2012-02-16 Thread Jerzy Karczmarczuk
as matplotlib lives in anther galaxy. It took a lot of time to implement SVG in Mozilla or Chrome... Jerzy Karczmarczuk -- Virtualization Cloud Management Using Capacity Planning Cloud computing makes use of virtualization

Re: [Matplotlib-users] svg in plot

2012-02-16 Thread Jerzy Karczmarczuk
I forgot to add something... Benjamin Root : There is absolutely no reason why a module could not be made for this, given that everything in matplotlib is assumed to be vector-based. You just need a library that can load up the data in the SVG file into information that is sensibly

Re: [Matplotlib-users] svg in plot

2012-02-16 Thread Jerzy Karczmarczuk
Benjamin Root : it would be impossible to fully implement, such a module would never be included in matplotlib, but that shouldn't stop someone from creating a useful basic tool. Yes. Thank you Ben. I so concentrated on the vector side of the original question that I forgot that AGG has a

Re: [Matplotlib-users] Visually equivalent contours/parallels

2012-02-14 Thread Jerzy Karczmarczuk
digging stops. Good luck. Jerzy Karczmarczuk -- Keep Your Developer Skills Current with LearnDevNow! The most comprehensive online learning library for Microsoft developers is just $99.99! Visual Studio, SharePoint, SQL

Re: [Matplotlib-users] Visually equivalent contours/parallels

2012-02-14 Thread Jerzy Karczmarczuk
Andrea, I believe that if you find ONE good visual aspect ratio, according to your figure size, that should do. Yo know your figsize, and if you know all in your axes([bot,lft,wid, height]), that this visual ratio should be easy to fix. BTW, I did not understand why do you play with your angle

Re: [Matplotlib-users] plot as individual colorbars

2012-02-14 Thread Jerzy Karczmarczuk
Could you provide a /working/ example with the geometry you really want? I believe I thought more or less about it as Tony Yu did. If it is wrong, be more precise, please. Jerzy Karczmarczuk -- Keep Your Developer

Re: [Matplotlib-users] Polygon contains_point() different from matplotlib.nxutils.points_inside_poly?

2012-02-13 Thread Jerzy Karczmarczuk
=Polygon(array([cos(th),sin(th)]).T) p.contains_point((0,0)) and the answer is 1. Jerzy Karczmarczuk -- Try before you buy = See our experts in action! The most comprehensive online learning library for Microsoft

Re: [Matplotlib-users] Polygon contains_point() different from matplotlib.nxutils.points_inside_poly?

2012-02-13 Thread Jerzy Karczmarczuk
to be relative to axes, it is enormous! p.contains_point((0,0),radius=0.01) gives 0 as it should. Jerzy Karczmarczuk P.S. I suggest anyway that reckoner submits a complete program with imports. What is patch?? -- Try

Re: [Matplotlib-users] problem to plot constant limited(within specific xrange value) y line within a square well

2012-02-12 Thread Jerzy Karczmarczuk
Debashish Saha : ... Question: then how to plot those specific component of E within the square well only? Why not: for m in E: plt.plot([-a,a],[m,m],'r') plt.show() Jerzy Karczmarczuk -- Virtualization Cloud

Re: [Matplotlib-users] Missing Segments in Output of imshow()

2012-02-09 Thread Jerzy Karczmarczuk
, which stores not the matrix, but the figure, the drawing of it after all the calamities. Use plt.imsave('bug.png',x,cmap=plt.cm.gray_r) Good luck. Jerzy Karczmarczuk -- Virtualization Cloud Management Using Capacity

Re: [Matplotlib-users] Missing Segments in Output of imshow()

2012-02-08 Thread Jerzy Karczmarczuk
to the figure size, and if you *insist* on having the nearest interpolation, you may lose pixels while drawing, it is as simple as that. No miracles. How to fix it? 1. Use bilinear, or sinc, or any smooth interpolation. 2. Make your figure big enough, say plt.figure(figsize=(14,14)). Jerzy

Re: [Matplotlib-users] How Clear Points Without Wiping Everything?

2012-02-02 Thread Jerzy Karczmarczuk
). Jerzy Karczmarczuk -- Keep Your Developer Skills Current with LearnDevNow! The most comprehensive online learning library for Microsoft developers is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3

Re: [Matplotlib-users] psd

2012-01-30 Thread Jerzy Karczmarczuk
://matplotlib.sourceforge.net/api/pyplot_api.html?highlight=psd#matplotlib.pyplot.psd You will find, for example, that the 5th argument, detrend, should be callable. In your code it is just a number. Use explicit keywords, it may save you from misunderstanding yourself... Jerzy Karczmarczuk OH

Re: [Matplotlib-users] Events

2012-01-29 Thread Jerzy Karczmarczuk
it, perhaps. All the best, sincerely. Jerzy Karczmarczuk Caen, France -- Try before you buy = See our experts in action! The most comprehensive online learning library for Microsoft developers is just $99.99! Visual Studio

Re: [Matplotlib-users] Events

2012-01-29 Thread Jerzy Karczmarczuk
exist, since Matplotlib does that already. Second, even if an event loop runs already, the question is to plug in the access to the concrete event queue mechanism, not to superpose another one, and yell with horror at which level declare callbacks... Thank you, Fernando. Jerzy Karczmarczuk

Re: [Matplotlib-users] Events

2012-01-29 Thread Jerzy Karczmarczuk
Fernando Perez: I now see there's even a pause() call: https://github.com/matplotlib/matplotlib/pull/148 so it seems like it should be an easy matter of adding the button and wire it to pause(). This is a temporal pause, not an undetermined suspension, restartable. Jerzy

Re: [Matplotlib-users] Events

2012-01-28 Thread Jerzy Karczmarczuk
Benjamin Root about my miserable event problem : Still not sure why my suggestion would not work: http://matplotlib.sourceforge.net/api/cbook_api.html#matplotlib.cbook.CallbackRegistry I thought I told you. Probably I am doing something utterly false, but my distilled problem is that*I am

Re: [Matplotlib-users] Events

2012-01-27 Thread Jerzy Karczmarczuk
Benjamin Root answers my query concerning user-generated events : To answer your question, take a look at how pick_event() is declared in backend_bases.py: def pick_event(self, mouseevent, artist, **kwargs): ... self.callbacks.process(s, event) The function that fires the

Re: [Matplotlib-users] Events

2012-01-27 Thread Jerzy Karczmarczuk
Tony Yu suggests that my multiple and changing animation problems could be solved using coroutining. have you looked into using a coroutine. /... /I've attached a simple example below. import matplotlib.pyplot as plt import numpy as np def datalistener(): ... while True: y0

[Matplotlib-users] Events

2012-01-26 Thread Jerzy Karczmarczuk
-processing loop, or use directly wxPython or PyGTK instead of Matplotlib. So, I don't need the replacement solution, but just a way to fire events within Matplotlib...) Thank you. Jerzy Karczmarczuk Caen, France -- Keep Your