I usually install the matplotlib binaries from pipy and I don't
remember doing a separate installation of freetype.
2017-02-18 17:20 GMT+01:00 Paul Hobson :
> Especially on Windows, I always install freetype from conda.
> -p
>
> On Sat, Feb 18, 2017 at 6:24 AM, CAB wrote:
>>
>> Hi, Gents,
>>
>> M
height of the figure to
be 2 in fractions of figure height. This means 1 must equal 2 and then
Bertrand Russel must be the Pope[1].
Goyo
[1]
http://ceadserv1.nku.edu/longa//classes/mat385_resources/docs/russellpope.html
2015-05-20 13:43 GMT+02:00 aradand :
> I'm trying to plot an image on
2014-07-04 8:30 GMT+02:00 Rachana Katkam :
> Hey, even I had similar issue.
> Later I learnt python2.7 could support matplotlib version1.0.1 only.
>
> So if you want to upgrade your matplotlib, you first need to upgrade your
> python.
matplotlib 1.3.1 works quite well with py
FWIW I can't tell any difference between colors in different backends.
I tried agg, cairo, several interactive backends and ipython inline in
Ubuntu.
Goyo
2014-05-17 6:14 GMT+02:00 Michael Goerz :
> On Fri, 16 May 2014, Eric Firing wrote:
>> On 2014/05/16 4:41 PM, Michael Goerz wr
rt the image to raster), but I could not
> find one in my search. Is there such a thing?
outfile = "basefile" + ".png"
Goyo
--
Learn Graph Databases - Download FREE O'Reilly Book
"Graph
> could be wrong), is the more compact format.
> http://matplotlib.org/faq/usage_faq.html
[...]
Roughly speaking, size of vector files depend on the number of points
while size of raster files depends on the number of pixels. For your
use case (many points, small images) raster out
o don't know this is being called.
Try using rc_context:
with plt.rc_context(rc={'axes.color_cycle': ['orange', default_cycle[1::]]}):
plt.plot(...)
This should change the color cycle only within the scope of the with
clause (not t
nt axes so calling it before creating the
second one should do. I think it would be more consistent if you used
the method ax1.grid() though.
Goyo
--
Managing the Performance of Cloud-Based Applications
Take advantage of w
>> My OS is Windows XP Service Pack 3
>> Python 2.6
>> Matplotlib 1.0.1
>>
>
> Is this actually a matplotlib problem or could it be a Windows problem
> as discussed here http://bugs.python.org/issue19246 ?
I think this is different. That bug rep
mpy as np
import matplotlib.pyplot as plt
xdat=np.arange(1,11)
simtimedata = np.array([0, 1, 5, 9, 13, 18, 21, 24, 25, 28])
idatanp = np.array([-1,0, 1, 2, 3, 2, 1, 0, -1, -2])
ax1 = plt.subplot(111)
ax1.plot(xdat,idatanp)
ax2 = ax1.twiny()
ax2.set_xticks(range(len(xdat)))
ax2
2013/9/28 Felix Patzelt :
> Dear all,
>
> manually placing labels when using clabel seems to be broken in Matplotlib
> 1.3.0.
>
> I'm on OS X 10.8.5 and have Matplotlib installed via macports. Today I
> updated all installed ports and thereby got the new version of Matplotlib.
> Now manually pla
gument to change this bahavoir but it is
not available in datestr2num.
http://labix.org/python-dateutil#head-a23e8ae0a661d77b89dfb3476f85b26f0b30349c
Goyo
--
LIMITED TIME SALE - Full Year of Microsoft Training For Just
2013/9/3 Michael Droettboom :
> That's correct. We could probably do a better job reporting that to the
> user, though. Would you mind creating an issue for that?
https://github.com/matplotlib/matplotlib/issues/2379
--
ver):
Ran 1465 tests in 402.499s
FAILED (KNOWNFAIL=1, SKIP=5, errors=1331)
But matplotlib itself is working pretty well. The output is full with
error messages like:
IOError: Baseline image
'/home/goyo/result_images/test_triangulation/tripcolor1-expected.svg'
does not exist.
It maybe th
ed) so it must have been fixed at
some point.
Goyo
<>--
Introducing Performance Central, a new site from SourceForge and
AppDynamics. Performance Central is your source for news, insights,
analysis and resources for
> "smuggling" the created figure out of the state environment.
> If there is a simple way to do this in Matplotlib, that
> would be quite useful.
Does pyplot.close(fig) not do what you need?
Goyo
--
position of the right spine to
> 'zero' seems to locate it at x=1.
>
> Is this a bug? Or is there something that I'm missing?
>
It looks like a bug to me, set_position('data', x) puts the spine at x + 1
instead of x.
Goyo
---
s that make sense?
http://ipython.org/ipython-doc/stable/interactive/qtconsole.html#pylab-inline
Goyo
--
Minimize network downtime and maximize team effectiveness.
Reduce network management and security costs.Learn how to
els(['a', 'b', 'c', 'd', 'e', 'f', 'g', 'h'])
Out[7]:
[,
,
,
,
,
,
,
]
In [8]: map(lambda x: x.get_text(), labels)
Out[8]: ['a', 'b', 'c', 'd', 'e',
2013/3/14 Oliver King :
> [...]
> I tried doing as you suggested [don't import Tk directly and change the
> backend to Agg] but it still crashes with the same TkAqua message.
You must set the desired backend from the very begining and before
importing pylab o
f this is a bug or a limitation of the jpg format.
Anyway, the jpg and png images are made of the same number of pixels
hence the dpi should not be an issue provided you can scale the image
in your publishing software. And the png format will do better in many
cases.
Goyo
--
2013/1/9 Goyo :
> I'm using matplotlib master from
> https://launchpad.net/%7Etakluyver/+archive/matplotlib-daily, ubuntu
> 12.10 and python 2.7 and sometimes I get misplaced y labels for twinx
> plots. I file a bug at github with a sample script and figure images:
> https://g
608
A guy commented there saying he can't replicate the issue. I wonder if
anyone using ubuntu 12.10 can try my code with the matplotlib version
from that repo and share the output.
Best regards
Goyo
--
Master Java S
2012/12/4 Tristan Strange :
> Hi all,
>
> I'm just getting started with matplotlib and am having a few problems
> producing a simple bar graph. The code I'm writing to produce this can be
> found here: http://pastebin.com/T0WA2dh8
>
> The issues I'm having are as follows:
>
> - The bars in my graph
call its
draw() method.
If you use pyplot.figure() to create a matplotlib window from your
app, call pyplot.draw().
Goyo
--
Monitor your physical, virtual and cloud infrastructure from a single
web console. Get in-depth
if not cbook.iterable(x): return _from_ordinalf(x, tz)
> File "c:\python26\lib\site-packages\matplotlib\dates.py", line 203,
> in _from_ordinalf
> dt = datetime.datetime.fromordinal(ix)
> ValueError: ordinal must be >= 1
>
> Adding a 0 & the c
and then for interactive mode in
code which is not mainly designed for interactive use.
Something that I often do is writing non interactive plotting
functions or methods and then wrappers for interactive use which call
draw_if_interactive ant do other fancy things.
Goyo
>
> Based on this thre
mented behavoir. There are separate methods for the
markers:
line[0].set_markerfacecolor
line[0].set_markeredgecolor
See
http://matplotlib.sourceforge.net/api/artist_api.html#matplotlib.lines.Line2D
Regards
Goyo
--
Live Se
ld expect the markers to change colors also. However, I can't seem to
> find the markers recorded in the legend object to be able to change them. Is
> this a bug or a feature (resetting the color could lead to inconsistencies
> between legend and plot)?
I think it's
xt(0.1, 0.3, 'XXX', alpha=0, bbox=dict(boxstyle='rarrow'))
text(0.1, 0.3, 'short')
text(0.1, 0.6, 'XXX', alpha=0, bbox=dict(boxstyle='rarrow'))
text(0.1, 0.6, 'looong')
show()
Goyo
---
.arange(2) + nudge
width = 0.30
bar(ind, a, width)
xlim(left=0)
Goyo
--
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and
threat landscape has changed and how IT mana
2012/6/19 Benjamin Root :
>
>
> On Tue, Jun 19, 2012 at 2:40 PM, Andre' Walker-Loud
> wrote:
>>
>> Hi Goyo,
>>
>> > 2012/6/19 Andre' Walker-Loud :
>> >> But my plots still vanish as soon as the script is done :
>> >
&g
otlib.pyplot as plt
plt.ioff()
plt.plot([1.6, 2.7])
Nothing happened–or at least nothing has shown up on the screen
(unless you are using macosx backend, which is anomalous).
--
Goyo
---
2012/6/19 Andre' Walker-Loud :
> But my plots still vanish as soon as the script is done :
That's to be expected. You can make the script not to end until the
user ask for it explicitly:
raw_input('Press when yo
2012/6/19 Goyo :
>> I think it normally shouldn't give the object ID.
>
> Yes, it should.
>
Sorry, not an "object ID" but a string representation of the returned object.
--
Live Security Vir
en't tried since then.
>
> In ipython --pylab it looks like this:
>
> In [1]: plt.plot(np.arange(5))
> Out[1]: []
>
> In [2]: plt.show()
>
> In [3]:
>
> but no widow opens.
Make sure an interactive backend is in use:
plt.get_backend()
>
> I think
gt; Is there a way to only get a single entry?
Maybe you can adapt this to your use case:
for i in range(10):
x=rand()
y=rand()
collection = scatter(x,y,label='point')
legend((collection,), ('Label',))
show()
Goyo
--
mpy as np
from matplotlib.mlab import PCA
But I don't know much about PCA and can't comment on this.
Goyo
--
Live Security Virtual Conference
Exclusive live event will cover all the ways today's secur
ble script which
reproduces the problem I'll take a look. Send it as an attachement and
add sample data files if necessary.
Goyo
--
For Developers, A Lot Can Happen In A Second.
Boundary is the first to Know...and Tell You.
Moni
te an array of datetime objects and use it as the x parameter to plot.
Goyo
--
Better than sec? Nothing is better than sec when it comes to
monitoring Big Data applications. Try Boundary one-second
resolution app monitoring tod
El día 12 de abril de 2012 03:46, questions anon
escribió:
> I am not sure how to recognise that x-axis are dates like 20110101,
> 20110102, 20110103 etc.
Use datetime objects instead of strings.
Goyo
st this and I guess you'll get a 2D array:
f=np.genfromtxt(inputfile, skip_header=6)
Goyo
--
This SF email is sponsosred by:
Try Windows Azure free for 90 days Click Here
http://p.sf.net
r at the beginning of the script
in order to know if it triggers the exception in that context.
>> [...] but I still end up with the same error.
So the call at the beginning didn't trigger the error?
Regards
Goyo
ets me nowhere or maybe?
I don't think matplotlib keeps a reference to a line object after you
remove it from the axes. If I'm right and you want to follow that path
you'll need to track it yourself.
Regards
Goyo
al_or(ma.getmaskarray(data),xymask))
AttributeError: logical_or
Is that the complete traceback?
Goyo
--
Keep Your Developer Skills Current with LearnDevNow!
The most comprehensive online learning library for Microsoft
w.com/questions/9661909/python-nltk-plots-are-not-showing-up
This usually happens when you're using a non interactive backend.
What's the output of plt.get_backend()?
Goyo
--
Try before you buy = See our ex
The save
dialogs seem to be the standard ones for the underlying toolkit so
reading the toolkit docs may help. Then there are the subplot params
configuration dialogs.
Goyo
--
Virtualization & Cloud Management Using Ca
kvxEygYE
There's also a tutorial in the scipy cookbook --maybe obsolete.
http://www.scipy.org/Cookbook/Matplotlib/Qt_with_IPython_and_Designer
Goyo
--
Virtualization & Cloud Management Using Capacity Planning
Cloud
t with tkagg, gtkagg and qt4agg backends.
Goyo
--
10 Tips for Better Server Consolidation
Server virtualization is being driven by many needs.
But none more important than the need to reduce IT complexity
while improvi
2011/11/22 Robert Kern :
> To get matplotlib 1.1.0 right now, you will have to build it yourself from
> sources.
Matplotlib packages for Precise also seem to work well in Oneiric.
Goyo
--
All the data contin
2011/11/15 Jun Tanaka :
> Dear All,
> I have a problem with installation of python(x,y). When I try, it says
> "python 2.6.2 msi was not found" If anyone knows how to resolve this issue,
> please help me. My OS is windows 7 64bit.
> If this mailing lists does not help pyhton(x,y) issue, please lea
ome computational cost).
Do you mean using an interactive backend? You can try gtkcairo and wx.
I think they have their own issues though.
Goyo
--
RSA(R) Conference 2012
Save $700 by Nov 18
Register now
http://p.sf.
ccuracy.
I can see the same deviations using the tkagg backend with mpl 1.1.0
but if I save as pdf using the save button I get an accurate rendering
(see attachment).
Best regards
Goyo
simple_example.pdf
Description: Adobe P
Maybe you need to call fig.canvas.draw() to get the figura actually resized.
2011/8/12, Benjamin Root :
> On Fri, Aug 12, 2011 at 10:04 AM, David Just wrote:
>
>> Now that I’m pre-building all my enlarged interpolated images to scroll
>> through, I’m having trouble forcing the figure/FigureCan
Seems like Axes.relim is what I was looking for. It does not take
collections into account but I don't need that for now.
2011/8/1, Goyo :
> Hy all,
>
> I recently had a pretty hard time trying to figure out how to properly
> autoscale a plot after removing a line (see attached
emented. Besides
any suggestions about how to deal with this are welcome. I just need
to adjust to lines right now but this may change in the future.
Best regards
Goyo
[1] http://old.nabble.com/Removing-a-line-from-a-plot-td7249600.html
autoscaling_issues.py
Desc
o cut a rectangle every 100km, turn it straight (but
> marking North) and put all rectangles next/under each other. Or should I
> plot everything and continue with an image library?
You can add several maps to the print composer, then make each map
sh
2011/5/15 Johannes Radinger :
> How is the space between the axis and the outer margins of a figure defined?
> How much space is between the upper most plot and the upper end of the figure?
> This is the space e.g for the titles etc. but can this be space be increased?
Use subplots_adju
2011/5/12 David Andrews :
> Hi,
>
> I've come across something I don't entirely understand in the
> behaviour of gridspec. It's not obvious from the code & docs for this
> module, but is it only supposed to be able to deal with 'square'
> layouts, e.g. 3x3, 4x4 etc?
>
> Taking some code from an ex
gle plot? Yes there are magic numbers there but
subplot also uses magic numbers under the hood, if I'm not wrong.
You can wrap your axes call into another function so at least the
magic numbers are not visible in the higher level code if the
ng the default locator). So you have to fine tune
if things don't fit together. Of course you can write custom
subplot-like functions which take care of this the way you find more
convenient.
I wonder how other plotting packages deal with
; text(.5,.5,'subplot(2,2,4)',...
> 'FontSize',14,'HorizontalAlignment','center')
>
> Reference: http://www.mathworks.com/help/techdoc/ref/subplot.html
>
> Is it possible in matplotlib?
Easier done than explained:
import matplotlib.pyplo
2011/4/23 _olivier_ :
> [...]
> I have got a matrix 6x500 (so one size is much biggger than the other one)
> and I try to expand the shorter axe so that the labels on it are well
> displayed (not overlapped.
Use the aspect kwarg in ma
2011/4/23 jfortiv :
>
> Hi,
>
> This actually did not work for me. Can you show me the full code that you
> used to successfully produce the time-format x-axis labels?
See attached files.
Goyo
sample.py
Descripti
intended
behavoir of pyplot, but it makes some sense). Using canvas.draw()
fixes your program in my mpl setup.
Goyo
--
Fulfilling the Lean Software Promise
Lean software platforms are now widely adopted and the bene
re there any way to do the same thing with linecollection?
> If not, is there any eother asy way of creating labels on a line?
You can customize the legend by hand.
http://matplotlib.sourceforge.net/users/legend_guide.html
Goyo
Maybe this:
import matplotlib.dates as mdates
formatter = mdates.DateFormatter('%d-%b-%y-%H:%M:%S')
axes.xaxis.set_major_formatter(formatter)
Goyo
--
Colocation vs. Managed Hosting
A question and answer guide to dete
ts that were removed.. It should rather be gaps in the
> line.
You can use masked arrays. Masked values don't get plotted. Sample
code (not tested):
import numpy.ma as ma # masked arrays module
...
mdata = ma.masked_array(data)
mdata[mdata <= 0] = ma.m
2011/3/9 Luciano Fleischfresser :
> [...]
> Does anybody know how to make the plot area start right at the
> beginning of data and finish right at the end, so it spans the whole x axis?
I think this should do the trick:
axes.autoscale(axis='x',
hnically a
> memory leak, it becomes one in practice, if I want to create a large number
> of figure objects. How can I free the memory used by one or all figure
> objects?
Your code creating many objects is not a memory leak. You can reuse
figures or dispose of them calling
needs adjustment to fit.
4. Draw again.
Sort of weird but it works and I think it's widely used.
Goyo
--
What You Don't Know About Data Connectivity CAN Hurt You
This paper provides an overview of data co
s the axes.custom_plot(x, y) sintax,
which requires subclassing Axes. But doing this is not common and not
straighforward if you want it to work well with pyplot.subplot() and
the like.
Maybe monkey patching would work but well, you know... I never tried it anyway.
bar() will allow you to color the bars individually.
Pylab hist() returns a list of patches so you can also change their properties.
Goyo
--
Free Software Download: Index, Search & Analyze Logs and other IT data
adjust
http://matplotlib.sourceforge.net/api/figure_api.html#matplotlib.figure.SubplotParams
http://matplotlib.sourceforge.net/faq/howto_faq.html#automatically-make-room-for-tick-labels
As a fast and dirty trick you can pass big numbers to subplo
2011/2/20 Curiouslearn :
> Thomas and Goyo,
>
> Thanks for the answers. I am fine with them being coverted to ints. In
> fact, my ax.set_ylim(bottom=0, top=6000) contains ints and I don't
> understand why they are converted to floats. I was thinking that there
> is perhap
ut !
If you don't want your floats converted to ints then use numpy arrange
or linespace.
Goyo
--
The ultimate all-in-one performance toolkit: Intel(R) Parallel Studio XE:
Pinpoint memory and threading errors before th
d_axes. Note that bottom is 0.3 and height is 0.9 so bottom + heigt
> 1. Maybe different backends differs handling the overflow.
Does this change in line 12 fix your issue?:
ax1 = fig1.add_axes([0.1, 0.3, 0.8, 0.6])
Goyo
>
> I have tried saving another usual line plot in .png format an
> plt.boxplot([1, 2, 3, 4])
{'medians': [], 'fliers':
[,
], 'whiskers':
[,
], 'boxes':
[], 'caps':
[,
]}
>>> plt.grid()
>>> # See attached image.
...
>>> mlab.prctile([1, 2, 3, 4])
array([ 1. , 1.75, 2.5 , 3.25, 4.
c=z, cmap=cmap, vmin=1, vmax=5)
plt.show()
You'll need to use a single space as column delimiter in your data
file or deal with more loadtxt arguments.
If your z data were color specifications you could just use
plt.scatter(x, y, c=z) as stated in the scatter docstring. Conve
rmed using tkagg, mpl 1.0.0 and Ubuntu 10.10. I do not know much
about the semantics of the pick event but it I don't think it should
discriminate between lines in the same
2D instances then use ax.get_lines().
Goyo
--
What happens now with your Lotus Notes apps - do you make another costly
upgrade, or settle for being marooned without product support? Time to move
off Lotus Notes and on
y0, c='b')
plt.scatter(x1, y1, c='r')
--%<
See the attached example, you can run it as a script or import it as a
module and use the function multi_scatter in yo
ta(x, y)
plt.draw()
I think this could be better done using animation features of
matplotlib, but I never used them and I think they varies across
toolkits. Search the docs for animation examples anyway.
Goyo
>
> What then happens is the path is drawn "live", as in my python cod
t(2)
> points = pylab.array(points)
> pylab.close()
>
> # replot with chosen points
> pylab.plot(x,y)
> pylab.plot(points[:,0],points[:,1],'ko')
> pylab.show()
> # wait for it, wait for it...now s
adjust it.
> - points on X-axis are separated by the hour, instead of values in datetime
> object
Matplotlib automagically chooses a format depending on the scale but you
can specify a format:
import matplotlib.dates as mdates
...
xaxis.set_major_formatter(mdates.DateFormatter('%Y-%b-
El dom, 11-01-2009 a las 16:48 +0100, Goyo escribió:
> El jue, 08-01-2009 a las 12:09 -0600, de...@verizon.net escribió:
> > I am sure this is a well know issue, so please feel free to just give a
> > link if the answer and solution are long. I have a newly installed
port matplotlib.pyplot as plt
plt.ion()
plt.plot([1,2,3])
plt.ylabel('Some Numbers')
plt.show() # You don't have to call show() in interactive mode though
Goyo
--
Check out the new SourceForge.net Marketplace.
It i
Make sure yu're using a backend with a user interface.
http://matplotlib.sourceforge.net/faq/installing_faq.html#what-is-a-backend
El mié, 19-11-2008 a las 10:49 -0500, Ron Brennan escribió:
> Hello,
>
> I am completely new to Matplotlib. I can't seem to get my script (a
> copy and paste from a
El dom, 12-10-2008 a las 13:22 -1000, Eric Firing escribió:
> Goyo wrote:
> > Hi all,
> >
> > I'm plotting time series and using a custom format for x tick labels
> > because I want to see both date and time. But calling xlim makes the
> > default format
El lun, 13-10-2008 a las 00:41 +0200, Goyo escribió:
> But I don't know how to set the dpi value this way. I tried to use the
> OO API but no success.
Well yes...
import matplotlib
matplotlib.use('GTKAgg')
from matplotlib import pyplot
fig = pyplot.figure(dpi=100)
ax =
don't know how to set the dpi value this way. I tried to use the
OO API but no success.
Goyo
El dom, 12-10-2008 a las 23:45 +0200, Jesper Larsen escribió:
> Hi matplotlib-users,
>
> I decided to try to make some plots that I have previously made in png
> format using the Agg backen
lling set_major_formatter again,
but this is inconvenient for interactive use.
I wonder if there is a better way for changing x limits while keeping
tick labels format unchanged.
I'm using matplotlib 0.98.3
Thanks
Goyo
Sample code -- you need a combination of python shell and matplotlib GUI
which
rs = [1, 2, 3, 4, 5]
english = ['one', 'two', 'three', 'four', 'five']
spanish = ['uno', 'dos', 'tres', 'cuatro', 'cinco']
x = [numbers, eng
Just give a look at zip(*head) and see that now it return two values so
you can't assign it to three variables.
¿What's the meaning of that data arrange? I can't make any sense of
plotting a 2D scatter from a 3D array.
Goyo
El jue, 25-09-2008 a las 15:15 +0200, Oz Nahum
)
pl.contour(xi, yi, g)
Level values are automatically chosen in this example but you can
provide the number of values or a sequence of them.
Note that no extrapolation is done outside convex hull defined by input
data.
Goyo
El sáb, 20-09-2008 a las 11:13 +0200, Oz Nahum escribió:
> I'
Tanks, Michael. Maybe I'll try to build from SVN this weekend.
Goyo
El jue, 18-09-2008 a las 09:31 -0400, Michael Droettboom escribió:
> Proper NaN handling has been a long and winding road.
>
> This particuar bug you're running into was fixed about a week *after*
&
shows the difference between plotting 127 and 128 data (look
at the left of each figure):
import pylab as pl
x = pl.random(128)
x[4:7] = pl.NaN
y = x[:-1]
pl.figure(1)
pl.plot(x, '-o')
pl.grid(True)
pl.figure(2)
pl.plot(y, '-o')
pl.grid(True)
pl.show()
Is this a known issue
97 matches
Mail list logo