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
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
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
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
(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
()
#
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
:
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
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
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
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
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
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
-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
() ? 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
.
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
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
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
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
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
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
. 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
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
(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
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
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.
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
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
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
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
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
, 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
=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
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
.
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
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
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
:
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
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
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
.
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
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
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
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
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
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
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
=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
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
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
,
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
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
).
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
://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
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
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
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
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
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
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
-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
60 matches
Mail list logo