Re: [Matplotlib-users] plotting large images

2013-08-27 Thread Oliver
You could, before plotting, sum the different image arrays? Depending on
whether you are plotting RGB(A) images or greyscale images, you could take
the sum of the color channels, or take a weighted average.
The method you use here depends strongly on the image type, but it will
reduce memory consumption.

Just a thought.


2013/8/27 Štěpán Turek 

> Hi,
>
> I would like to plot multiple overlayed 4096x4096 images in one axes. If I
> run this code the plot takes 300 MB of memory:
>
> import numpy as np
> import matplotlib.pyplot as plt
>
> if __name__ == '__main__':
> img = np.zeros((4096, 4096))
> img[100: 300, 100:1500] = 200
> imgplot = plt.imshow(img)
>
> plt.show()
>
> And it takes additional 300 MB for every image with this size added into
> plot. Is there any way to reduce memory consumption without need of data
> resampling?
>
> My configuration:
> Matplotlib 1.2.1
> Numpy 1.7.1
> Ubuntu 13.04 64 bit
>
> Best
> Stepan
>
>
> --
> Introducing Performance Central, a new site from SourceForge and
> AppDynamics. Performance Central is your source for news, insights,
> analysis and resources for efficient Application Performance Management.
> Visit us today!
> http://pubads.g.doubleclick.net/gampad/clk?id=48897511&iu=/4140/ostg.clktrk
> ___
> Matplotlib-users mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
>
>
--
Introducing Performance Central, a new site from SourceForge and 
AppDynamics. Performance Central is your source for news, insights, 
analysis and resources for efficient Application Performance Management. 
Visit us today!
http://pubads.g.doubleclick.net/gampad/clk?id=48897511&iu=/4140/ostg.clktrk___
Matplotlib-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] plotting large images

2013-08-27 Thread Oliver
Those numbers actually make a lot of sense.
For a 4k by 4k 2D array of 64-bit floats, you're using 128MiB of memory,
just to store them. Displaying such an array with mpl would take a copy of
that and add some objects for housekeeping (on my machine about 150MB to
display one such array together with the housekeeping objects).

You could look at whether or not you actually need 64-bit precision. Often
times, 8-bit precision per color channel is justifiable, even in grayscale.
My advice is to play with the dtype of your array or, as you mentioned,
resample.

Also, is it needed to keep all images? It sounds to me like your
application will become very resource hungry if you're going to be
displaying several of these 2D images over each other (and if you don't use
transparency, you won't get any benefit at all from plotting them together).


2013/8/27 Štěpán Turek 

> Hi,
>
>
> You could, before plotting, sum the different image arrays? Depending on
> whether you are plotting RGB(A) images or greyscale images, you could take
> the sum of the color channels, or take a weighted average.
>
>
> Yes, I will probably merge the images (RGBA) before plotting. I want to
> create more plots and even with this optimization every plot will take 300
> MB... Is there any way how to save some memory?
>
>
> Best
>
> Stepan
>
>
>
--
Introducing Performance Central, a new site from SourceForge and 
AppDynamics. Performance Central is your source for news, insights, 
analysis and resources for efficient Application Performance Management. 
Visit us today!
http://pubads.g.doubleclick.net/gampad/clk?id=48897511&iu=/4140/ostg.clktrk___
Matplotlib-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] Setting the tick label font size

2013-10-28 Thread Oliver
Hi Daniele,

not sure, but it seems to work for me. Did you do a plt.draw() or
plt.show() to reflect the changes?

Kind regards,

Oliver


2013/10/28 Daniele Nicolodi 

> Hello,
>
> I'm trying to change the font size for the tick labels. I've tried both
> setting it explicitly when creating the labels:
>
>   ax2.set_xticklabel(['%d' % x for x in arange(10)], fontsize=10)
>
> or after:
>
>   for label in ax2.get_xticklabels():
>   label.set_fontsize(8)
>
> but the rendering is unaffected by the setting.  This is with the MacOSX
> backend and with the PDF backend.  Is it a bug or am I missing something?
>
> Thanks. Best,
> Daniele
>
>
> --
> Android is increasing in popularity, but the open development platform that
> developers love is also attractive to malware creators. Download this white
> paper to learn more about secure code signing practices that can help keep
> Android apps secure.
> http://pubads.g.doubleclick.net/gampad/clk?id=65839951&iu=/4140/ostg.clktrk
> ___
> Matplotlib-users mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
>
--
Android is increasing in popularity, but the open development platform that
developers love is also attractive to malware creators. Download this white
paper to learn more about secure code signing practices that can help keep
Android apps secure.
http://pubads.g.doubleclick.net/gampad/clk?id=65839951&iu=/4140/ostg.clktrk___
Matplotlib-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] SVG version of the data graph of the logo

2014-03-11 Thread Oliver
Have you checked out the api logo2
example
?

It will allow you to have the logo in a variety of display formats.



2014-03-11 9:50 GMT+01:00 Christophe Bal :

> Hello,
> it could be very useful for websites, and not only mine, to have a SVC of
> both the logo and only the data graph used in the logo.
>
> Is there at least a SVG downloadable version of the logo ?
>
> Best regards.
> Christophe BAL
>
>
> --
> Learn Graph Databases - Download FREE O'Reilly Book
> "Graph Databases" is the definitive new guide to graph databases and their
> applications. Written by three acclaimed leaders in the field,
> this first edition is now available. Download your free book today!
> http://p.sf.net/sfu/13534_NeoTech
> ___
> Matplotlib-users mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
>
>
--
Learn Graph Databases - Download FREE O'Reilly Book
"Graph Databases" is the definitive new guide to graph databases and their
applications. Written by three acclaimed leaders in the field,
this first edition is now available. Download your free book today!
http://p.sf.net/sfu/13534_NeoTech___
Matplotlib-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] video without black bands

2014-03-12 Thread Oliver
Please don’t double post. Also, this post is much more informative than the
first, it’s much clearer now where the problem is, and it is not related to
matplotlib at all, but with the options you’re passing to *mencoder*.

What’s the size of your orginal pngs?



2014-03-12 11:58 GMT+01:00 diedro :

> Dear all,
> I have created a video from *.png files. The problem is that my video has
> black bands on the left and on the right. I have used the following
> commands:
>
> command = ('mencoder',
>'mf://*.png',
>'-mf',
>'type=png:w=9800:h=600:fps=0.6',
>'-ovc',
>'lavc',
>'-lavcopts',
>'vcodec=mpeg4',
>'-oac',
>'copy',
>'-o',
>'output.avi')
>
> How could I create a video without the black bands.
>
> Thank you all,
>
>
>
> --
> View this message in context:
> http://matplotlib.1069221.n5.nabble.com/video-without-black-bands-tp43045.html
> Sent from the matplotlib - users mailing list archive at Nabble.com.
>
>
> --
> Learn Graph Databases - Download FREE O'Reilly Book
> "Graph Databases" is the definitive new guide to graph databases and their
> applications. Written by three acclaimed leaders in the field,
> this first edition is now available. Download your free book today!
> http://p.sf.net/sfu/13534_NeoTech
> ___
> Matplotlib-users mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
>
--
Learn Graph Databases - Download FREE O'Reilly Book
"Graph Databases" is the definitive new guide to graph databases and their
applications. Written by three acclaimed leaders in the field,
this first edition is now available. Download your free book today!
http://p.sf.net/sfu/13534_NeoTech___
Matplotlib-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] matplolib imshow contour/heatmap

2014-03-16 Thread Oliver
The matplotlib function contourf() should do what you want. Have a look at
this example:
http://matplotlib.org/examples/pylab_examples/contourf_demo.html

I apologize if it is not what you're looking for. I haven't read your whole
script, because it is not *a minimal working example* (http://www.sscce.org/)
and I'm not going to do your homework. If, after having tried contourf, you
find a bug or an explained feature, please do post again.


2014-03-15 19:06 GMT+01:00 sweep :

> Hi, im trying to create a heatmap/colourmap/contour style plot similar to
> http://www.idlcoyote.com/cg_tips/outcontourbar.png but I cant seem to get
> it
> working correctly. The code takes a number of parameters on the command
> line
> because it is passed by an external PHP script. Essentially its a list of
> lat/lon/values which I want to interpolate and plot but I cant get anything
> like the image above, I cant get the vmin/vmax to work for the colorbar and
> I dont know why the whole plot is squared off rather than fading to white
> if
> you see what I mean
>
> import os
> import tempfile
> import math
> os.environ['MPLCONFIGDIR'] = tempfile.mkdtemp()
> import argparse
> import numpy as np
> import matplotlib
> matplotlib.use('Agg')
> import matplotlib.pyplot as plt
> import scipy.interpolate
>
> width = 800
> height = 600
>
> lat_min = []
> lon_min = []
> lat_max = []
> lon_max = []
>
> # assumes lat is y, lon is x, and image is 800x600
> def latToXY(lat):
> global width, height, lat_min, lat_max
> y = ((lat - lat_min) / (lat_max - lat_min)) * height
> #print y
> return y
>
> def lonToXY(lon):
> global width, height, lon_min, lon_max
> lon = math.fabs(lon)
> x = ((lon - lon_min) / (lon_max - lon_min)) * width
> #print x
> return x
>
> def scipy_idw(x, y, z, xi, yi):
> #interp = scipy.interpolate.Rbf(x, y, z, function='linear')
> interp = scipy.interpolate.Rbf(x, y, z)
> return interp(xi, yi)
>
> def plot(x,y,z,grid,legend_min,legend_max,filename):
> plt.figure()
> fig = plt.imshow(grid, vmin=legend_min, vmax=legend_max, extent=[0,
> 1024, 0, 768])
> fig.axes.get_xaxis().set_visible(False) # hide axis labels
> fig.axes.get_yaxis().set_visible(False)
> #plt.hold(True)
> plt.scatter(x,y,c=z)
> plt.colorbar()
> plt.savefig(filename)
>
> # grab all floats from command line
> parser = argparse.ArgumentParser()
> parser.add_argument('--l1', type=str)
> parser.add_argument('--l2', type=str)
> parser.add_argument('--l3', type=str)
> parser.add_argument('--min', type=str)
> parser.add_argument('--max', type=str)
> parser.add_argument('--filename', type=str)
> args = parser.parse_args()
>
> # create a list by splitting at the comma
> l1_list = args.l1.split(',') # ['1','2','3','4']
> l2_list = args.l2.split(',')
> l3_list = args.l3.split(',')
>
> legend_min = float(args.min)
> legend_max = float(args.max)
> filename = args.filename
>
> # convert string list to list of floats
> for i in range(len(l1_list)):
> l1_list[i] = float(l1_list[i])
> l2_list[i] = float(l2_list[i])
> l3_list[i] = float(l3_list[i])
>
> lat_min = min( math.fabs(yy) for yy in l2_list )
> lat_max = max( math.fabs(yy) for yy in l2_list )
> lon_min = min( math.fabs(xx) for xx in l1_list )
> lon_max = max( math.fabs(xx) for xx in l1_list )
>
> # convert list of floats to x,y
> for i in range(len(l1_list)):
> l1_list[i] = lonToXY(l1_list[i])
> l2_list[i] = latToXY(l2_list[i])
>
> # convert list to numpy array
> x = np.array(l1_list)
> y = np.array(l2_list)
> z = np.array(l3_list)
>
> #print x
> #print y
> #print z
> nx, ny = 50, 50
> xi, yi = np.linspace(x.min(), x.max(), nx), np.linspace(y.min(), y.max(),
> ny)
> xi, yi = np.meshgrid(xi, yi)
> xi, yi = xi.flatten(), yi.flatten()
>
> grid2 = scipy_idw(x,y,z,xi,yi)
> grid2 = grid2.reshape((ny, nx))
>
> plot(x,y,z,grid2,legend_min,legend_max,filename)
>
> I call the script with the following parameters:
>
> plot.py --l1=-1.8791363,-1.8786206,-1.8796862,-1.878171
> --l2=57.458459,57.458153,57.458495,57.458036 --l3=42.3,37.8,43.5,47.7
> --min=0 --max=100 --filename=/tmp/plot.png
>
>
>
> Any help is greatly appreciated
>
> Thanks
>
>
>
> --
> View this message in context:
> http://matplotlib.1069221.n5.nabble.com/matplolib-imshow-contour-heatmap-tp43078.html
> Sent from the matplotlib - users mailing list archive at Nabble.com.
>
>
> --
> Learn Graph Databases - Download FREE O'Reilly Book
> "Graph Databases" is the definitive new guide to graph databases and their
> applications. Written by three acclaimed leaders in the field,
> this first edition is now available. Download your free book today!
> http://p.sf.net/sfu/13534_NeoTech
> ___
> Matplotlib-users mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinf

Re: [Matplotlib-users] Set X,Y,and Z data for a pcolormesh

2014-04-03 Thread Oliver
If I understand your intent well, then you want to make slices through a 3D
volume and show such slice planes.

I’ve always done this with the various functions of an Axes3D instance that
allow you to specify the slice position. On the matplotlib examples page,
there is a good example that showed me how to do what I wanted (even though
I only had a series of 1D data):
polys3d_demo
.

You could use the same technique with contourf, which is probably closer to
what you want. Have a look at this stackoverflow
question.


I hope this helps.


2014-04-03 6:50 GMT+02:00 james :

> Hi All,
>
> I wish to make a 3d volume with a series of slices through it. I have X-Z
> data at 15 different Y planes. In MATLAB, I would make a pcolor plot, then
> set the Z data to the original ydata, and the Y data to a constant. This
> works fine.
>
> I would like to achieve a similar result in matplotlib, but I cannot figure
> out anyway to do it.
>
> Any help would be appreciated.
>
> James
>
>
>
> --
> View this message in context:
> http://matplotlib.1069221.n5.nabble.com/Set-X-Y-and-Z-data-for-a-pcolormesh-tp43187.html
> Sent from the matplotlib - users mailing list archive at Nabble.com.
>
>
> --
> ___
> Matplotlib-users mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
>
--
___
Matplotlib-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


[Matplotlib-users] possible documentation mistake in errorbar (mpl 1.1.1rc)

2014-04-11 Thread Oliver
I apologize if this has been fixed already, I can only check different
versions at home. However, the documentation of mpl
1.3.1.
has the same information. So unless the code changed to reflect the
documentation, this is still present.

When using errorbar, the documentation says the color of the errorbar lines
will match with the color of the markers if ecolor=None. That’s not what I
found. Apparently it takes over the color of the Line2D instance which
interconnects the markers.

Short, Self Contained, Correct Example:

from pylab import *
plt.ion()  # saves typing show

x = np.arange(10)
y = np.random.rand(10)
xerr, yerr = y/4., y/4.

# Markers in red, but errorlines assume the color of the "trendline"
(default rcparams: blue).
errorbar(x, y, yerr=yerr, mfc='r', marker='o', ecolor=None)

# Errorlines get color green now - documentation not in line with results

figure(); errorbar(x, y, yerr=xerr, mfc='r', marker='o', ecolor=None, color='g')
# Errorlines get color blue now, because it can be specified -
expected behaviour
figure(); errorbar(x, y, yerr=xerr, mfc='r', marker='o', ecolor='b', color='g')

Is this an oversight mistake?
--
Put Bad Developers to Shame
Dominate Development with Jenkins Continuous Integration
Continuously Automate Build, Test & Deployment 
Start a new project now. Try Jenkins in the cloud.
http://p.sf.net/sfu/13600_Cloudbees___
Matplotlib-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] Pick a particular data from array

2014-06-19 Thread Oliver
Just to clarify, do you actually want to be able to "pick" it, so by
selecting in interactively (and probably manually, i.e. with the mouse) or
are you only interested in displaying the "data underneath the line".

The second is straightforward: just plot in a new axes the relevant row of
your 2D data.
The former requires you to add events to your figure so that you can pick
values interactively. The matplotlib example [pick_event_demo][1] shows you
how it's done. I recomment studying it and then asking again if it doesn't
work.



1: http://matplotlib.org/examples/event_handling/pick_event_demo.html


2014-06-19 2:56 GMT+02:00 dydy2014 :

> Thank you Paul for your comment, but what I need not just put a line in the
> contour.
> I want to pick value along the red line, so which the data that placed on
> the red line.
> Then I will plot it in the other type of plot.
>
>
>
>
>
>
>
> --
> View this message in context:
> http://matplotlib.1069221.n5.nabble.com/Pick-a-particular-data-from-array-tp43532p43545.html
> Sent from the matplotlib - users mailing list archive at Nabble.com.
>
>
> --
> HPCC Systems Open Source Big Data Platform from LexisNexis Risk Solutions
> Find What Matters Most in Your Big Data with HPCC Systems
> Open Source. Fast. Scalable. Simple. Ideal for Dirty Data.
> Leverages Graph Analysis for Fast Processing & Easy Data Exploration
> http://p.sf.net/sfu/hpccsystems
> ___
> Matplotlib-users mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
>
--
HPCC Systems Open Source Big Data Platform from LexisNexis Risk Solutions
Find What Matters Most in Your Big Data with HPCC Systems
Open Source. Fast. Scalable. Simple. Ideal for Dirty Data.
Leverages Graph Analysis for Fast Processing & Easy Data Exploration
http://p.sf.net/sfu/hpccsystems___
Matplotlib-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


[Matplotlib-users] plot directive cannot have caption

2014-07-03 Thread Oliver
Adding a caption to a plot inserted with the `plot` directive from mpl's
sphinxextensions does not work for me, even though the [documentation][1]
says it should be possible.

The relevant ReST snippet:
```
.. plot:: /home/oliver/git/lcp2/code/python/plot_scripts/tangent_circles.py
:align: center
:alt: 'Schematic drawing of the two solution methods'

Schematic drawing showing the two possible solution methods discussed.
```

I'm getting the following traceback:

# Sphinx version: 1.1.3
# Python version: 2.7.3
# Docutils version: 0.9.1 release
# Jinja2 version: 2.6
Traceback (most recent call last):
  File
"/usr/local/lib/python2.7/dist-packages/Sphinx-1.1.3-py2.7.egg/sphinx/cmdline.py",
line 189, in main
app.build(force_all, filenames)
  File
"/usr/local/lib/python2.7/dist-packages/Sphinx-1.1.3-py2.7.egg/sphinx/application.py",
line 204, in build
self.builder.build_update()
  File
"/usr/local/lib/python2.7/dist-packages/Sphinx-1.1.3-py2.7.egg/sphinx/builders/__init__.py",
line 196, in build_update
'out of date' % len(to_build))
  File
"/usr/local/lib/python2.7/dist-packages/Sphinx-1.1.3-py2.7.egg/sphinx/builders/__init__.py",
line 216, in build
purple, length):
  File
"/usr/local/lib/python2.7/dist-packages/Sphinx-1.1.3-py2.7.egg/sphinx/builders/__init__.py",
line 120, in status_iterator
for item in iterable:
  File
"/usr/local/lib/python2.7/dist-packages/Sphinx-1.1.3-py2.7.egg/sphinx/environment.py",
line 613, in update_generator
self.read_doc(docname, app=app)
  File
"/usr/local/lib/python2.7/dist-packages/Sphinx-1.1.3-py2.7.egg/sphinx/environment.py",
line 761, in read_doc
pub.publish()
  File
"/usr/local/lib/python2.7/dist-packages/docutils-0.9.1-py2.7.egg/docutils/core.py",
line 221, in publish
self.settings)
  File
"/usr/local/lib/python2.7/dist-packages/docutils-0.9.1-py2.7.egg/docutils/readers/__init__.py",
line 69, in read
self.parse()
  File
"/usr/local/lib/python2.7/dist-packages/docutils-0.9.1-py2.7.egg/docutils/readers/__init__.py",
line 75, in parse
self.parser.parse(self.input, document)
  File
"/usr/local/lib/python2.7/dist-packages/docutils-0.9.1-py2.7.egg/docutils/parsers/rst/__init__.py",
line 162, in parse
self.statemachine.run(inputlines, document, inliner=self.inliner)
  File
"/usr/local/lib/python2.7/dist-packages/docutils-0.9.1-py2.7.egg/docutils/parsers/rst/states.py",
line 174, in run
input_source=document['source'])
  File
"/usr/local/lib/python2.7/dist-packages/docutils-0.9.1-py2.7.egg/docutils/statemachine.py",
line 239, in run
context, state, transitions)
  File
"/usr/local/lib/python2.7/dist-packages/docutils-0.9.1-py2.7.egg/docutils/statemachine.py",
line 460, in check_line
return method(match, context, next_state)
  File
"/usr/local/lib/python2.7/dist-packages/docutils-0.9.1-py2.7.egg/docutils/parsers/rst/states.py",
line 2706, in underline
self.section(title, source, style, lineno - 1, messages)
  File
"/usr/local/lib/python2.7/dist-packages/docutils-0.9.1-py2.7.egg/docutils/parsers/rst/states.py",
line 331, in section
self.new_subsection(title, lineno, messages)
  File
"/usr/local/lib/python2.7/dist-packages/docutils-0.9.1-py2.7.egg/docutils/parsers/rst/states.py",
line 399, in new_subsection
node=section_node, match_titles=True)
  File
"/usr/local/lib/python2.7/dist-packages/docutils-0.9.1-py2.7.egg/docutils/parsers/rst/states.py",
line 286, in nested_parse
node=node, match_titles=match_titles)
  File
"/usr/local/lib/python2.7/dist-packages/docutils-0.9.1-py2.7.egg/docutils/parsers/rst/states.py",
line 199, in run
results = StateMachineWS.run(self, input_lines, input_offset)
  File
"/usr/local/lib/python2.7/dist-packages/docutils-0.9.1-py2.7.egg/docutils/statemachine.py",
line 239, in run
context, state, transitions)
  File
"/usr/local/lib/python2.7/dist-packages/docutils-0.9.1-py2.7.egg/docutils/statemachine.py",
line 460, in check_line
return method(match, context, next_state)
  File
"/usr/local/lib/python2.7/dist-packages/docutils-0.9.1-py2.7.egg/docutils/parsers/rst/states.py",
line 2706, in underline
self.section(title, source, style, lineno - 1, messages)
  File
"/usr/local/lib/python2.7/dist-packages/docutils-0.9.1-py2.7.egg/docutils/parsers/rst/states.py",
line 331, in section
self.new_subsection(title, lineno, messages)
  File
"/usr/local/lib/python2.7/dist-packages/docutils-0.9.1-py2.7.egg/docutils/parsers/rst/states.py",
line 399, in new_subsection
node=section_node, match_titles=True)
  File
"/usr/local/lib/python2.7/dist-packages/docutils-0.9.1-py2.7.egg/docutils/parsers/rst/states.py",
line 286, in nested_parse
node=node, match_titles=match_titles)
  File
"

Re: [Matplotlib-users] graphical graph - how to

2014-07-29 Thread Oliver
The solution below is maybe not optimal, but it's something you can figure
out easily enough yourself. Also, I believe this question is better asked
on stackoverflow as it is not an actual matplotlib issue, but rather a
programming problem (that shows no effort).

Let me first redefine your matrices to comply with PEP8.

nodes = np.array([[1,2,3,4],[0, 5, 2, 8]])  # What you call Q. The first
node here is (1,0)
connections = np.triu(np.random.rand(4,4))  # What you call Z
connections[0,3] = 0  # Just to make the plot a little more clear.

for row,_ in enumerate(connections):
for col in range(row+1, connections.shape[0]):
if connections[row, col]:
plt.plot(
nodes[0,[row,col]], nodes[1,[row,col]],
color='{}'.format(connections[row, col]))  # Uses
gray-scale color-coding
plt.plot(nodes[0,:], nodes[1,:], 'ko ')


2014-07-29 14:18 GMT+02:00 Josè Luis Mietta :

> Hi experts!
>
> I have:
>
> * a list of Q 'NODES'=[(x,y)_1,, (x,y)_Q], where each element
> (x,y) represent the spatial position of the node in 2D Cartesian space.
> * a matrix 'H' with QxQ elements {H_k,l}.
> H_k,l=0 if nodes 'k' and 'l' aren't joined by a edge, and H_k,l = the length
> of the edge that connects these nodes.
> * a matrix 'Z' with QxQ elements {Z_k,l}.
> Z_k,l=0 if nodes 'k' and 'l' aren't joined by a edge, and Z_k,l =
> intensity_k,l (a intensity scale of the edge, 0 nodes are connected.
>
> I want to draw the nodes in their spatial position, connected by the
> edges, and use a color scale for the 'intensity'.
>
> How must I do that?
>
> Waiting for your answers.
>
> Thanks a lot!
>
> Best regards,
> José Luis
>
>
> --
> Infragistics Professional
> Build stunning WinForms apps today!
> Reboot your WinForms applications with our WinForms controls.
> Build a bridge from your legacy apps to the future.
>
> http://pubads.g.doubleclick.net/gampad/clk?id=153845071&iu=/4140/ostg.clktrk
> ___
> Matplotlib-users mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
>
>
--
Infragistics Professional
Build stunning WinForms apps today!
Reboot your WinForms applications with our WinForms controls. 
Build a bridge from your legacy apps to the future.
http://pubads.g.doubleclick.net/gampad/clk?id=153845071&iu=/4140/ostg.clktrk___
Matplotlib-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] Filling area between two values

2014-09-07 Thread Oliver
pyplot.gca().set_xlim([0, 10])


2014-09-07 13:20 GMT+02:00 Albert Yiamakis :

>  Hello,
>
> When creating a simple plot with
>
> xs = [0.01*x for x in range(1000)]
> ys = [x*x for x in xs]
> pyplot.fill_between(xs, ys)
>
> The plot shows between x=0 and x=10, as expected.
> However, when looking to fill between 2 and 8, in this way:
>
> b = [False if x<2 or x>8 else True for x in xs]
> pyplot.fill_between(xs, ys, where=b)
>
> Then the plot shows between x=0 and x=8. Is there a way to get it to show
> up to x=10? Thanks,
>
> Albert
>
>
> --
> Slashdot TV.
> Video for Nerds.  Stuff that matters.
> http://tv.slashdot.org/
> ___
> Matplotlib-users mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
>
>
--
Slashdot TV.  
Video for Nerds.  Stuff that matters.
http://tv.slashdot.org/___
Matplotlib-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] How to plot other than rectangular grid?

2014-11-21 Thread Oliver
As Thomas Caswell said, check out the "tri..." functions. No need for
interpolation. This question recently reappeared on Stackoverflow and was
answered there as well:
https://stackoverflow.com/questions/27004422/contour-imshow-plot-for-irregular-x-y-z-data

2014-11-21 9:15 GMT+01:00 Shahar Shani Kadmiel :

> When using scipy.interpolate.griddada, you could use 'nearest' if your
> data is sufficiently dense. This will 'map' your grid onto whatever
> rectangular grid leaving grid points outside the convex hull of the
> original grid empty. Well, not empty but nan.
> If you do wish to interpolate your dada, you could mask the resulting
> rectangular grid post interpolation.
>
> —
> Sent from Mailbox 
>
>
> On Fri, Nov 21, 2014 at 2:12 AM, Maria Liukis  wrote:
>
>> Hello,
>>
>> I have a problem plotting data which is defined on a grid other than
>> rectangular mesh, and would greatly appreciate any advise. My data is
>> defined for 0.1degree grid for the state of California, and I don’t want to
>> interpolate my data outside of the defined grid when plotting it. I used
>> pcolormesh() function for rectangular area maps, but it only accepts
>> rectangular grid and I was wondering if there is a simple solution to my
>> problem.
>>
>> The only solution I could find was to use scipy.interpolate,griddata() to
>> “map” my grid to a bounding rectangular grid (bounding rectangle around CA
>> state), but that would also interpolate my data to grid cells outside of CA
>> state, which I don’t want to do.
>>
>> Many thanks for any hints!
>> Masha
>> --
>> [email protected]
>>
>>
>>
>>
>> --
>>
>> Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server
>> from Actuate! Instantly Supercharge Your Business Reports and Dashboards
>> with Interactivity, Sharing, Native Excel Exports, App Integration & more
>> Get technology previously reserved for billion-dollar corporations, FREE
>>
>> http://pubads.g.doubleclick.net/gampad/clk?id=157005751&iu=/4140/ostg.clktrk
>> ___
>> Matplotlib-users mailing list
>> [email protected]
>> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
>>
>
>
>
> --
> Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server
> from Actuate! Instantly Supercharge Your Business Reports and Dashboards
> with Interactivity, Sharing, Native Excel Exports, App Integration & more
> Get technology previously reserved for billion-dollar corporations, FREE
>
> http://pubads.g.doubleclick.net/gampad/clk?id=157005751&iu=/4140/ostg.clktrk
> ___
> Matplotlib-users mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
>
>
--
Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server
from Actuate! Instantly Supercharge Your Business Reports and Dashboards
with Interactivity, Sharing, Native Excel Exports, App Integration & more
Get technology previously reserved for billion-dollar corporations, FREE
http://pubads.g.doubleclick.net/gampad/clk?id=157005751&iu=/4140/ostg.clktrk___
Matplotlib-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


[Matplotlib-users] 'Poly3DCollection' object has no attribute '_facecolors2d'

2015-02-05 Thread Oliver
Greetings,

before I submit an issue I usually try to confirm on the mailing list that
the issue I'm experiencing is not just on my system.
At the moment, I've tested this only on my personal laptop, but in virtual
environments.
One venv has mpl version 1.3.1, the other has just been installed (with
only numpy, matplotlib and ipython) and thus has mpl version 1.4.2.

In both environments the following script fails:

import numpy as np
import matplotlib.tri as mtri
import matplotlib.pyplot as plt
from mpl_toolkits.mplot3d import Axes3D

y,x = np.ogrid[1:10:100j, 1:10:100j]
z = x**2-x*y
z2 = np.cos(x)**3 - np.sin(y)**2
fig = plt.figure()
ax = fig.add_subplot(111, projection='3d')
r = ax.plot_surface(x,y,z2, cmap='hot')
r.get_facecolors()

It fails on the last line with the following traceback:
---
AttributeErrorTraceback (most recent call last)
 in ()
> 1 r.get_facecolors()

/home/oliver/.virtualenvs/mpl/local/lib/python2.7/site-packages/mpl_toolkits/mplot3d/art3d.pyc
in get_facecolors(self)
634
635 def get_facecolors(self):
--> 636 return self._facecolors2d
637 get_facecolor = get_facecolors
638

AttributeError: 'Poly3DCollection' object has no attribute '_facecolors2d'

Can anyone confirm on their system that this is a bug?
I have the same error appearing for `get_facecolor()` (without the s) by
the way.

Regards,

Oliver
--
Dive into the World of Parallel Programming. The Go Parallel Website,
sponsored by Intel and developed in partnership with Slashdot Media, is your
hub for all things parallel software development, from weekly thought
leadership blogs to news, videos, case studies, tutorials and more. Take a
look and join the conversation now. http://goparallel.sourceforge.net/___
Matplotlib-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] 'Poly3DCollection' object has no attribute '_facecolors2d'

2015-02-05 Thread Oliver
Bug report made under issue 4067
<https://github.com/matplotlib/matplotlib/issues/4067>.

Thanks for confirming the bug!
​

2015-02-05 22:43 GMT+01:00 Benjamin Root :

> Yup, that is a real bug... self._facecolors2d doesn't get set until the
> first draw. It really shouldn't be accessing _facecolors2d because the
> elements can change order depending on the rotation of the display. Could
> you file the bug report, please?
>
> Thanks!
> Ben Root
>
>
> On Thu, Feb 5, 2015 at 4:32 PM, Oliver  wrote:
>
>> Greetings,
>>
>> before I submit an issue I usually try to confirm on the mailing list
>> that the issue I'm experiencing is not just on my system.
>> At the moment, I've tested this only on my personal laptop, but in
>> virtual environments.
>> One venv has mpl version 1.3.1, the other has just been installed (with
>> only numpy, matplotlib and ipython) and thus has mpl version 1.4.2.
>>
>> In both environments the following script fails:
>>
>> import numpy as np
>> import matplotlib.tri as mtri
>> import matplotlib.pyplot as plt
>> from mpl_toolkits.mplot3d import Axes3D
>>
>> y,x = np.ogrid[1:10:100j, 1:10:100j]
>> z = x**2-x*y
>> z2 = np.cos(x)**3 - np.sin(y)**2
>> fig = plt.figure()
>> ax = fig.add_subplot(111, projection='3d')
>> r = ax.plot_surface(x,y,z2, cmap='hot')
>> r.get_facecolors()
>>
>> It fails on the last line with the following traceback:
>>
>> ---
>> AttributeErrorTraceback (most recent call
>> last)
>>  in ()
>> > 1 r.get_facecolors()
>>
>> /home/oliver/.virtualenvs/mpl/local/lib/python2.7/site-packages/mpl_toolkits/mplot3d/art3d.pyc
>> in get_facecolors(self)
>> 634
>> 635 def get_facecolors(self):
>> --> 636 return self._facecolors2d
>> 637 get_facecolor = get_facecolors
>> 638
>>
>> AttributeError: 'Poly3DCollection' object has no attribute '_facecolors2d'
>>
>> Can anyone confirm on their system that this is a bug?
>> I have the same error appearing for `get_facecolor()` (without the s) by
>> the way.
>>
>> Regards,
>>
>> Oliver
>>
>>
>> --
>> Dive into the World of Parallel Programming. The Go Parallel Website,
>> sponsored by Intel and developed in partnership with Slashdot Media, is
>> your
>> hub for all things parallel software development, from weekly thought
>> leadership blogs to news, videos, case studies, tutorials and more. Take a
>> look and join the conversation now. http://goparallel.sourceforge.net/
>> ___
>> Matplotlib-users mailing list
>> [email protected]
>> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
>>
>>
>
--
Dive into the World of Parallel Programming. The Go Parallel Website,
sponsored by Intel and developed in partnership with Slashdot Media, is your
hub for all things parallel software development, from weekly thought
leadership blogs to news, videos, case studies, tutorials and more. Take a
look and join the conversation now. http://goparallel.sourceforge.net/___
Matplotlib-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


[Matplotlib-users] ConnectionPatch axesA has to be the "latest" axes

2015-08-20 Thread Oliver
It would seem the `axesA` keyword always has to be the "latest" axes. If
not, the connector does not get added to the figure.

Minimal, complete and verifiable example:
##
from matplotlib.patches import ConnectionPatch
import matplotlib.pyplot as plt
import matplotlib as mpl
import platform

print(mpl.__version__)
print(platform.python_version())

xya = (.5,.5)
xyb = (.6,.7)

# shows nothing
f1, (ax11, ax12) = plt.subplots(1,2, sharey=False)
con1 = ConnectionPatch(xyA=xya, xyB=xyb , coordsA='data', coordsB='data',
axesA=ax12, axesB=ax11)
ax11.add_artist(con1)

# shows clipped line
f2, (ax21, ax22) = plt.subplots(1,2, sharey=False)
con2 = ConnectionPatch(xyA=xyb, xyB=xya , coordsA='data', coordsB='data',
axesA=ax21, axesB=ax22)
ax21.add_artist(con2)

# shows desired result
f3, (ax31, ax32) = plt.subplots(1,2, sharey=False)
con3 = ConnectionPatch(xyA=xya, xyB=xyb , coordsA='data', coordsB='data',
axesA=ax32, axesB=ax31)
ax32.add_artist(con3)

# shows nothing
f4, (ax41, ax42) = plt.subplots(1,2, sharey=False)
con4 = ConnectionPatch(xyA=xyb, xyB=xya , coordsA='data', coordsB='data',
axesA=ax41, axesB=ax42)
ax42.add_artist(con4)

plt.draw()
plt.show()

##

While reference to clipping is made in the user guide[1], the seemingly
forced choice of `axesA` had me stumped for quite some time. While I
understand that the choice of the axes to add the connector is important to
avoid overlap (in other words, on which axes one should call the
`add_artist` method), it seems unimportant whether xyA or xyB are
referenced in ax1 or ax2.

To clarify: I was expecting example 4 above to show a similar line as
example 3.


[1]: http://matplotlib.org/users/annotations_guide.html#using-connectorpatch
--
___
Matplotlib-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


[Matplotlib-users] A row gets deleted when using plt.imsave

2013-06-18 Thread Oliver
I'm running the following on mpl 1.2.1:

import matplotlib.pyplot as plt
import numpy as np

A = np.arange(1020*1368*3, dtype=np.uint8).reshape(1020, 1368, 3)
plt.imsave('dimcheck.png', A)

The OS tells me the picture has 1019x1368px. So one row is missing. It
works fine for e.g. 10x10x3, I'm not yet sure why it does this for this
specific dimension. PIL's save method works fine, as does pypng.

I can't check the behaviour on my other machine for now, because that one
has mpl 1.1.1 and plt.imsave apparently did not yet support 24-bit RGB
writing at that time (in 1.1.1: TypeError: from_bounds() takes exactly 4
arguments (5 given)).

Is this a bug or is there something wrong with my setup?
--
This SF.net email is sponsored by Windows:

Build for Windows Store.

http://p.sf.net/sfu/windows-dev2dev___
Matplotlib-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] plot directive cannot have caption

2014-07-07 Thread Oliver W.
Merely adding a link here from another user on the  sphinx-users google-group
  
who came across the same problem 2 years ago. If the issue gets solved, I'll
know to update the other post as well.



--
View this message in context: 
http://matplotlib.1069221.n5.nabble.com/plot-directive-cannot-have-caption-tp43608p43627.html
Sent from the matplotlib - users mailing list archive at Nabble.com.

--
Open source business process management suite built on Java and Eclipse
Turn processes into business applications with Bonita BPM Community Edition
Quickly connect people, data, and systems into organized workflows
Winner of BOSSIE, CODIE, OW2 and Gartner awards
http://p.sf.net/sfu/Bonitasoft
___
Matplotlib-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


[Matplotlib-users] possible regression in plt.draw (mpl 1.4.3 -> 1.5.0) when using fig.text using transformations

2016-03-01 Thread Oliver Willekens
Dear matplotlib users and developers,

I'm using `plt.draw()` to force the rendering of all artists and then,
based on their newly calculated positions, place a text label on the figure
window in figure coordinates.

The goal is to add a text label near the conventional y-axis, at the top,
right-aligned. Example code that demonstrates the problem:

```
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import numpy as np
import matplotlib.pyplot as plt
import matplotlib as mpl
print(mpl.__version__)

x = np.linspace(0, 50)
y = 4*np.sin(x) + 5

fig = plt.figure(figsize=(18,9.8))
ax = fig.add_axes((0.1, 0.1, 0.8, 0.8),
frameon=True,
aspect='equal',
adjustable='box',
xlim=(x.min(), x.max()),
ylim=(0, 10),
xticks=[x.min(), x.max()],
yticks=[0, 10],
xlabel='dimension (unit)')
ax.plot(x, y)
plt.draw()  # force redraw

ylabel_pos =
fig.transFigure.inverted().transform_point(ax.transAxes.transform_point((0,1)))
label1 = fig.text(ylabel_pos[0], ylabel_pos[1], "label1", ha="right",
va="bottom")
plt.savefig('/tmp/test_pre_mpl_v_{}.png'.format(mpl.__version__))
ylabel_pos =
fig.transFigure.inverted().transform_point(ax.transAxes.transform_point((0,1)))
label2 = fig.text(ylabel_pos[0], ylabel_pos[1], "label2", ha="right",
va="bottom")
plt.savefig('/tmp/test_post_mpl_v_{}.png'.format(mpl.__version__))
```

The code shows that in mpl 1.4.3 both label1 and label2 end up at the same
(desired) position. However, mpl 1.5.0 and 1.5.1 (just installed to check)
show that label1 is at a height of 0.9 in the figure coordinates. After the
first call to `savefig`, the figure is rendered with the axes getting a new
height and width (due to the call to `aspect='equal', adjustable='box'`)
and so the subsequent call to `savefig` renders label2 in the correct
position.

Using `ax.text(x=0, y=1, s='label', transform=ax.transAxes, ha="right",
va="bottom")` gets the job done alright (both in 1.4.3, as well as 1.5.0),
but the call to `fig.text` using the subsequent transforms should have
worked, I believe.

Kind regards,

Oliver
--
Site24x7 APM Insight: Get Deep Visibility into Application Performance
APM + Mobile APM + RUM: Monitor 3 App instances at just $35/Month
Monitor end-to-end web transactions and take corrective actions now
Troubleshoot faster and improve end-user experience. Signup Now!
http://pubads.g.doubleclick.net/gampad/clk?id=272487151&iu=/4140___
Matplotlib-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


[Matplotlib-users] problems with numpoints in legend

2009-07-06 Thread Oliver Tomic
Hi,

Windows XP
Python 2.5.2
matplotlib 0.98.5.2

I try to use numpoints for a legend my plot, but without luck. I always 
end up having three points in the legend despite setting numpoints=1 (see 
below towards the end of the code).
Things work nicely though in a much simpler script.

Help is greatly appreciated. 

Cheers 
Oliver


[CODE START]
# Import necessary modules
import numpy as np
import matplotlib.pyplot as plt


# Import data for correlation plot
assC = np.loadtxt('Apples_flowerFlavour_assC_corrPlot.txt')
all = np.loadtxt('Apples_flowerFlavour_allAssessors_corrPlot.txt')

x_assC = assC[:,1].copy()
y_assC = assC[:,0].copy()

x_all = all[:,1].copy()
y_all = all[:,0].copy()


# Plot values 
fig = plt.figure()
ax = fig.add_subplot(111)
ax.scatter(x_all, y_all, s=10, c='w', marker='o', edgecolor='grey', 
label='_')
# NOTE: label='_' excludes the lable from legend

ax.scatter([x_assC[0]], [y_assC[0]], s=50, c='r', marker='s', label='Apple 
Golden')
ax.scatter([x_assC[1]], [y_assC[1]], s=50, c='r', marker='v', 
label='Granny Smith')
ax.scatter([x_assC[2]], [y_assC[2]], s=50, c='r', marker='d', label='Green 
Star')
ax.scatter([x_assC[3]], [y_assC[3]], s=50, c='r', marker='^', 
label='Kanzi')
ax.scatter([x_assC[4]], [y_assC[4]], s=50, c='r', marker='>', label='Pink 
Lady')
ax.scatter([x_assC[5]], [y_assC[5]], s=50, c='r', marker='<', label='Royal 
Gala')
ax.scatter([x_assC[6]], [y_assC[6]], s=35, c='r', marker='o', 
label='Ecological')

ax.plot([0,10], [0,10], 'b--')

ax.set_xlim(0,10)
ax.set_ylim(0,10)

# Fix legend settings
plt.legend(loc='lower right', shadow=True, numpoints=1)
ltext = plt.gca().get_legend().get_texts()
plt.setp(ltext[0], fontsize = 10, color = 'k')

ax.set_xlabel('panel average')
ax.set_ylabel('assessor C')

plt.show()
[CODE END]

 
--
___
Matplotlib-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] problems with numpoints in legend

2009-07-11 Thread Oliver Tomic
Jae-Joon and John, 

thank you for your help. Just a few minutes before I read your emails I 
found a thread in the archives (from a few months back) where Jae-Joon 
anwered exactly the same question. 

http://www.nabble.com/legend-bug--td22466216.html#a22466216

Sorry, that I overlooked that last time searched in the archives. 
'Scatterpoints=1' did what I needed. 

Thanks again for your thelp. 

Cheers
OIiver





Jae-Joon Lee  wrote on 11.07.2009 16:42:29:

> From:
> 
> Jae-Joon Lee 
> 
> To:
> 
> John Hunter 
> 
> Cc:
> 
> Oliver Tomic , 
[email protected]
> 
> Date:
> 
> 11.07.2009 16:47
> 
> Subject:
> 
> Re: [Matplotlib-users] problems with numpoints in legend
> 
> The number of points in scatter plot has other keyword argument
> (scatterpoints). This is true for svn version, but I'm not quite sure
> if it is also true for 0.98.5.2.
> Anyhow, the documentation still needs to be updated.
> 
> Regards,
> 
> -JJ
> 
> 
> On Sat, Jul 11, 2009 at 9:46 AM, John Hunter wrote:
> > On Mon, Jul 6, 2009 at 6:06 AM, Oliver Tomic 
wrote:
> >> Hi,
> >>
> >> Windows XP
> >> Python 2.5.2
> >> matplotlib 0.98.5.2
> >>
> >> I try to use numpoints for a legend my plot, but without luck. I 
always end
> >> up having three points in the legend despite setting numpoints=1 (see 
below
> >> towards the end of the code).
> >> Things work nicely though in a much simpler script.
> >>
> >> Help is greatly appreciated.
> >
> > When posting an example, it helps if we can run it:-)  In this case,
> > we would need your data files
> >
> > assC = np.loadtxt('Apples_flowerFlavour_assC_corrPlot.txt')
> > all = np.loadtxt('Apples_flowerFlavour_allAssessors_corrPlot.txt')
> >
> > JDH
> >
> > 
> 
--
> > Enter the BlackBerry Developer Challenge
> > This is your chance to win up to $100,000 in prizes! For a limited 
time,
> > vendors submitting new applications to BlackBerry App World(TM) will 
have
> > the opportunity to enter the BlackBerry Developer Challenge. See full 
prize
> > details at: http://p.sf.net/sfu/Challenge
> > ___
> > Matplotlib-users mailing list
> > [email protected]
> > https://lists.sourceforge.net/lists/listinfo/matplotlib-users
> >
> 
> 
--
> Enter the BlackBerry Developer Challenge 
> This is your chance to win up to $100,000 in prizes! For a limited time, 

> vendors submitting new applications to BlackBerry App World(TM) will 
have
> the opportunity to enter the BlackBerry Developer Challenge. See full 
prize 
> details at: http://p.sf.net/sfu/Challenge
> ___
> Matplotlib-users mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
--
Enter the BlackBerry Developer Challenge  
This is your chance to win up to $100,000 in prizes! For a limited time, 
vendors submitting new applications to BlackBerry App World(TM) will have
the opportunity to enter the BlackBerry Developer Challenge. See full prize  
details at: http://p.sf.net/sfu/Challenge___
Matplotlib-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


[Matplotlib-users] legend and symbols

2009-11-30 Thread Oliver Tomic
Hi,

I am not sure whether this has been reported before or maybe even got 
fixed already. When I make scatter plot and plot a point with marker = 'o' 
it appears as a circle in the plot as it should. It won't, however, appear 
in the legend. 

Windows XP
Python(x,y) 2.6.0
matplotlib 0.99.1 (I think :-)


Example:
ax.scatter([x_assF[6]], [y_assF[6]], s=35, c='r', marker='o', 
label='Ecological') 

doesn't show in the legend. When I change the same line of code to

ax.scatter([x_assF[6]], [y_assF[6]], s=35, c='r', marker='8', 
label='Ecological')

that is, the marker is now set to marker='8', then it will appear as a 
circle in the legend. Is this a bug or am I messing something up here? 
Finde complete code and data sets below:



[CODE START]
# -*- coding: utf-8 -*-
"""
correlationPlot_fig15.2.py
"""

# Import necessary modules
import numpy as np
import matplotlib.pyplot as plt


# Import data for correlation plot
assF = np.loadtxt('Apples_flowerFlavour_assF_corrPlot.txt')
all = np.loadtxt('Apples_flowerFlavour_allAssessors_corrPlot.txt')

x_assF = assF[:,1].copy()
y_assF = assF[:,0].copy()

x_all = all[:,1].copy()
y_all = all[:,0].copy()


# Plot correlation plot values 
fig = plt.figure()
ax = fig.add_subplot(111)
ax.scatter(x_all, y_all, s=10, c='w', marker='o', edgecolor='grey', 
label='_')
# NOTE: label='_' excludes the lable from legend

ax.scatter([x_assF[0]], [y_assF[0]], s=50, c='r', marker='s', label='Alpe 
Golden')
ax.scatter([x_assF[1]], [y_assF[1]], s=50, c='r', marker='v', 
label='Granny Smith')
ax.scatter([x_assF[2]], [y_assF[2]], s=50, c='r', marker='d', label='Green 
Star')
ax.scatter([x_assF[3]], [y_assF[3]], s=50, c='r', marker='^', 
label='Kanzi')
ax.scatter([x_assF[4]], [y_assF[4]], s=50, c='r', marker='>', label='Pink 
Lady')
ax.scatter([x_assF[5]], [y_assF[5]], s=50, c='r', marker='<', label='Royal 
Gala')
ax.scatter([x_assF[6]], [y_assF[6]], s=35, c='r', marker='o', 
label='Ecological')

ax.plot([0,10], [0,10], 'b--')

ax.set_xlim(0,10)
ax.set_ylim(0,10)

# Fix legend settings
plt.legend(loc='lower right', shadow=True, scatterpoints=1)
ltext = plt.gca().get_legend().get_texts()
plt.setp(ltext[0], fontsize = 10, color = 'k')

ax.set_xlabel('Score - panel average')
ax.set_ylabel('Score - assessor F')

plt.show()
[CODE END]



Vennlig hilsen / Yours sincerely
Oliver Tomic
Research scientist, Dr. scient


Osloveien 1
1430 Ås
Norway
Tel: +47 6497 0252
Mob: +47 9574 6167
[email protected] / www.nofima.no<>4   2.4
1   1
1   1.23
3.252.31
4.653.14
2.9 1.95
3.452.123.552.4
1   1
1   1.23
1   2.31
3.353.14
1   1.95
2.452.12
1   2.4
1   1
1   1.23
4.652.31
5.3 3.14
1.851.95
3   2.12
1   2.4
1   1
1   1.23
1.2 2.31
1   3.14
1   1.95
1.552.12
3.6 2.4
1   1
1.951.23
1.652.31
3.053.14
3.151.95
2.6 2.12
1.8 2.4
1   1
1.5 1.23
1.852.31
2.153.14
1.651.95
1.8 2.12
4   2.4
1   1
1   1.23
3.252.31
4.653.14
2.9 1.95
3.452.12
2.3 2.4
1   1
1   1.23
2.452.31
2.2 3.14
1   1.95
1.752.12
2.452.4
1   1
1.6 1.23
1.5 2.31
2.453.14
2.1 1.95
1.452.12
1.9 2.4
1   1
1   1.23
3.2 2.31
4.1 3.14
2.9 1.95
1   2.12--
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with
Crystal Reports now.  http://p.sf.net/sfu/bobj-july___
Matplotlib-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


[Matplotlib-users] graphs removing gaps to left and right,

2008-11-06 Thread oliver marks
hi,

I have successfully written my first test program in matlab, it works
perfectly except the display is not quite right, to the left and write
of the plotted data there are blank areas with nothing on, how can i get
rid of these a link to the image is attached, and the code is below.

hope someone can tell me what i am doing wrong.

http://imagebin.ca/view/dYSphQ.html

import dateutil
import datetime


class graph:
def __init__(self):
pass

def data(self):
pass

def line_graph(self,path):
return "matplotlib not installed, graph not displayed."

def bar_graph(self,path):
return "matplotlib not installed, graph not displayed."

try:
import matplotlib
matplotlib.use("agg")
import numpy as np
import matplotlib.pyplot as plt
import pylab
from matplotlib.dates import MonthLocator, WeekdayLocator 

class graph:
def __init__(self):
self.xaxis=[]
self.yaxis=[]
self.values=[]
self.fig=pylab.figure() 

def data(self,data):
self.values=data

def labels(self):
pass
def xaxis_dates(self,dates,format="%d/%m/%Y"):
dtlist=[datetime.datetime.strptime(s, format) for s in
dates]
self.xaxis=pylab.date2num(dtlist)
ax = self.fig.add_subplot(111) 
days= WeekdayLocator()   # every year
months   = MonthLocator()  # every month
ax.xaxis.set_major_locator(months)
#ax.xaxis.set_minor_locator(days)

def line_graph(self):
plt.plot_date(self.xaxis,self.values,visible=True,
linestyle='-')

def bar_graph(self):
plt.bar(self.xaxis,self.values)
#plt.bar(self.xaxis,self.values,label=r)

def make(self,fname):
plt.savefig(fname)
htmout=""
return htmout

#matplotlib not installed rather than fall over create a dummy class, as
we do not want to rely on graphing,
#non essential feature
except ImportError, e:
class graph:
def __init__(self):
self.xaxis=[]
self.yaxis=[]
self.data=[]

def data(self,data):
pass

def line_graph(self,path):
return "matplotlib not installed, graph not displayed."

def bar_graph(self,path):
return "matplotlib not installed, graph not displayed."

def make(self):
plt.plot_date(da,d,visible=True, linestyle='-')
plt.savefig("graph.png")


dates=['01/10/2008', '02/10/2008', '03/10/2008', '04/10/2008',
'05/10/2008', '06/10/2008', '07/10/2008', '08/10/2008', '09/10/2008',
'10/10/2008', '11/10/2008', '12/10/2008', '13/10/2008', '14/10/2008',
'15/10/2008', '16/10/2008', '17/10/2008', '18/10/2008', '19/10/2008',
'20/10/2008', '21/10/2008', '22/10/2008', '23/10/2008', '24/10/2008',
'25/10/2008', '26/10/2008', '27/10/2008', '28/10/2008', '29/10/2008']
data=(73, 76, 58, 0, 0, 105, 138, 98, 64, 42, 0, 0, 100, 115, 97, 69,
153, 1, 0, 84, 122, 131, 77, 97, 0, 0, 117, 99, 101)

g=graph()
g.xaxis_dates(dates)
g.data(data)
g.line_graph()
g.make("test.png")

g=graph()
g.xaxis_dates(dates)
g.data(data)
g.bar_graph()
g.make("testbar.png")
#dates=[datetime.datetime.strptime(s, "%d/%m/%Y") for s in r]
#print r
#print dates
#d=(73, 76, 58, 0, 0, 105, 138, 98, 64, 42, 0, 0, 100, 115, 97, 69, 153,
1, 0, 84, 122, 131, 77, 97, 0, 0, 117, 99, 101)
#d=(100,150)
#days= MonthLocator()   # every year
#months   = MonthLocator()  # every month
#yearsFmt = DateFormatter('%Y')

#fig = pylab.figure() 
#ax = fig.add_subplot(111) 

#labels = ax.get_xticklabels()
#pylab.setp(labels,'rotation','vertical')

#days= MonthLocator()   # every year
#months   = MonthLocator()  # every month
#ax.xaxis.set_major_locator(months)
#ax.xaxis.set_major_formatter(yearsFmt)
#ax.xaxis.set_minor_locator(days)


#da=pylab.date2num(dates)
#plt.plot_date(da,d,visible=True, linestyle='-')
#plt.bar(da,d,label=r)
#plt.savefig("graph.png")


CONFIDENTIALITY NOTICE:
The information contained in this communication is confidential and may be 
legally privileged. It is intended solely for the use of the individual(s) to 
whom it is addressed and others authorised to receive it. If you are not the 
intended recipient you are hereby notified that any disclosure, copying, 
distribution or action taken in relation to the contents of this information is 
strictly prohibited and may be unlawful. Neither the sender nor HoMedics Group 
Ltd is liable for the correct and complete transmission of the contents of an 
email, or for its timely receipt. If you receive this communication in error, 
please destroy it and notify HoMedics Group Ltd immediately on +44 (0)1732 
354828. Company No. 4353765, Registered Address: HoMedics House, Somerhill 
Business Park, Five Oak Green

[Matplotlib-users] matplotlib cairo backend

2009-01-29 Thread Oliver Marks
are there any tutorials / examples / documentation on the use of the
cairo backend i am currently using gtk and want to work with cairo for
printing.

I have looked around and not found much information on this backend.


signature.asc
Description: This is a digitally signed message part
--
This SF.net email is sponsored by:
SourcForge Community
SourceForge wants to tell your story.
http://p.sf.net/sfu/sf-spreadtheword___
Matplotlib-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


[Matplotlib-users] Missing example source code

2012-03-05 Thread Oliver King
Hi,

I wanted to see the source code for an example on the Axis Artist page, 
specifically this bit of source code:
http://matplotlib.sourceforge.net/mpl_toolkits/axes_grid/figures/axis_direction_demo_step04.py

Unfortunately, I got a 404 not found error. Please would whoever is in charge 
of this fix the link? Several of the other bits of source code in this example 
are also not there.

Thanks,
Oliver
--
Try before you buy = See our experts in action!
The most comprehensive online learning library for Microsoft developers
is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
Metro Style Apps, more. Free future releases when you subscribe now!
http://p.sf.net/sfu/learndevnow-dev2
___
Matplotlib-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


[Matplotlib-users] Varying alpha in ListedColormap not working

2012-12-05 Thread Oliver King
Hi,

I've been trying to plot a line with varying alpha (but constant color). After 
much googling I have come up with the following code segment, which by all 
indications should work. It works when I vary an individual RGB element, but 
not when I vary alpha.

#
import numpy as np
import matplotlib.pyplot as plt
from matplotlib.collections import LineCollection
from matplotlib.colors import ListedColormap, BoundaryNorm

# the line to plot
x = np.linspace(0,1,101)
y = x*0.5-0.25
scaling = np.exp(-(x-0.5)**2/0.5**2) # scale the transparency of the line 
according to this

# Create a colormap which has a constant color, but varies the transparency.
N = 50 # this many different transparency levels
alpha_boundaries = np.linspace(np.min(scaling),np.max(scaling),N+1)
# The lowest values are transparent, the highest ones are opaque
cmap = ListedColormap([(0.0,0.0,0.0,a) for a in np.linspace(0,1,N)])
norm = BoundaryNorm(alpha_boundaries, cmap.N)

# Create a set of line segments so that we can color them individually
# This creates the points as a N x 1 x 2 array so that we can stack points
# together easily to get the segments. The segments array for line collection
# needs to be numlines x points per line x 2 (x and y)
points = np.array([x, y]).T.reshape(-1, 1, 2)
segments = np.concatenate([points[:-1], points[1:]], axis=1)

# Create the line collection object, setting the colormapping parameters.
# Have to set the actual values used for colormapping separately.
lc = LineCollection(segments, cmap=cmap, norm=norm)
lc.set_array(scaling)

ax = plt.subplot(111)
ax.add_collection(lc)
plt.xlim(x.min(), x.max())
plt.ylim(y.min(), y.max())
plt.show()
#

What appears to be happening is that the alpha values in the cmap I use when I 
create the ListedColormap object are being ignored by the add_collection 
function. I see that this bug (or something quite like it) was reported in late 
2008:
http://matplotlib.1069221.n5.nabble.com/create-ListedColormap-with-different-alpha-values-tt18693.html#a18697

Did the patch from late 2008 not make it into the code, or has this bug 
resurfaced? Does anyone know of a workaround for this issue?

Cheers,
Oliver


--
LogMeIn Rescue: Anywhere, Anytime Remote support for IT. Free Trial
Remotely access PCs and mobile devices and provide instant support
Improve your efficiency, and focus on delivering more value-add services
Discover what IT Professionals Know. Rescue delivers
http://p.sf.net/sfu/logmein_12329d2d
___
Matplotlib-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] Varying alpha in ListedColormap not working

2012-12-05 Thread Oliver King

> What is your matplotlib.__version__ ? I think that code only made it's
> way into v1.2.0 (the latest stable), and was did not make it into
> v1.1.1 (or anything before it)

I'm running 1.1.0 - I'll upgrade it now. Thanks for the help!

Oliver

--
LogMeIn Rescue: Anywhere, Anytime Remote support for IT. Free Trial
Remotely access PCs and mobile devices and provide instant support
Improve your efficiency, and focus on delivering more value-add services
Discover what IT Professionals Know. Rescue delivers
http://p.sf.net/sfu/logmein_12329d2d
___
Matplotlib-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] plotting time series of bits

2012-12-06 Thread Oliver King
Hi Luke,


> I been able to use the bitwise_and() and right_shift() on the data to
> get individual arrays which are populated with only 0's and1's.
> 
> What I'm not clear on is now how to get the solid filled rectangle for
> areas where the bit is high and nothing when the bit is low.
> 
> Is there already this functionality somewhere in matplotlib?  I looked
> in the gallery and couldn't find anything quite like what I'm looking
> for, though I may have simply missed it.  If there isn't, I'm sure
> there is a way to do it, does anybody have any recommendations as to
> the path of least resistance?

How about using imshow()? Turn your individual arrays into a three-dimensional 
array of (r,g,b,a) values (MxNx4 array). You can then overwrite the axis labels 
(pixel numbers) with the boolean state descriptors and the time stamps. 

Cheers,
Oliver



--
LogMeIn Rescue: Anywhere, Anytime Remote support for IT. Free Trial
Remotely access PCs and mobile devices and provide instant support
Improve your efficiency, and focus on delivering more value-add services
Discover what IT Professionals Know. Rescue delivers
http://p.sf.net/sfu/logmein_12329d2d
___
Matplotlib-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] Varying alpha in ListedColormap not working

2012-12-06 Thread Oliver King
Incidentally, if anyone else wants to do this and is unable to update their 
matplotlib to v1.2.0, this code snippet achieves the same effect.

###
import numpy as np
import matplotlib.pyplot as plt
from matplotlib.collections import LineCollection

# the line to plot
x = np.linspace(0,1,101)
y = x*0.5-0.25
scaling = np.exp(-(x-0.5)**2/0.5**2) # scale the transparency of the line 
according to this

points = np.array([x, y]).T.reshape(-1, 1, 2)
segments = np.concatenate([points[:-1], points[1:]], axis=1)

smin = scaling.min()
smax = scaling.max()
# inline function to convert scaling value to alpha value in [0,1]
alpha = lambda s0: (s0-smin)/(smax-smin)

# create a (r,g,b,a) color description for each line segment
cmap = []
for a in segments:
# the x-value for this segment is:
x0 = a.mean(0)[0]
# so it has a scaling value of:
s0 = np.interp(x0,x,scaling)
# and it has an alpha value of:
a0 = alpha(s0)
cmap.append([0.0,0.0,0.0,a0])

# Create the line collection object, and set the color parameters.
lc = LineCollection(segments)
lc.set_color(cmap)

ax = plt.subplot(111)
ax.add_collection(lc)
ax.set_xlim(x.min(), x.max())
ax.set_ylim(y.min(), y.max())
plt.show()
###


--
LogMeIn Rescue: Anywhere, Anytime Remote support for IT. Free Trial
Remotely access PCs and mobile devices and provide instant support
Improve your efficiency, and focus on delivering more value-add services
Discover what IT Professionals Know. Rescue delivers
http://p.sf.net/sfu/logmein_12329d2d
___
Matplotlib-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] How to start when you don't know what to do

2013-01-15 Thread Oliver King
Hi Steven,

I first look at what types of plots and axes are available out-of-the-box. The 
gallery and examples sections of the matplotlib webpage are good places to get 
ideas about what is possible when programming in this mode. 

If there isn't an existing axis type which works, I take one of two approaches. 
If it is a type of plot which I will be making many times, I try to make my own 
type of axis / projection: see 
http://matplotlib.org/examples/axes_grid/demo_floating_axes.html for an example 
of what I mean.

If I'm simply trying to reproduce a graphic only once, I will generally fudge 
it by drawing a bunch of Collections (usually a PolyCollection or 
LineCollection, http://matplotlib.org/api/collections_api.html) on a normal 
cartesian axis, and then hide the axes, ticks and ticklabels.

This approach works for me, though your mileage may vary.

Cheers.
Oliver

On Jan 15, 2013, at 11:52 AM, Steven Boada wrote:

> Heyya list.
> 
> I must admit that my matplotlib-foo is only so so. One of the biggest 
> problems that I face is seeing cool stuff around the net, and thinking, 
> "that's pretty neat, I'd like to copy it." In reality, I have no idea 
> how I would go about creating something like that.
> 
> Here's an example: http://imgur.com/JdkR4
> 
> Just a little circular histogram thing with some annotations. Obviously, 
> I'd need the annotate command for the words, but what about the arcs? No 
> idea, off hand. So my question is, how do you decode (read: what to 
> think about) figures that you see, and turn them into actual python? 
> Sure I could post on stack exchange or email all you people every time, 
> but I want to be *better* at this. And while some people are going to 
> scoff and reply "that's easy, silly" it's not so for some. I just hate 
> to admit it's me.
> 
> Thanks for the advice.
> 
> -- 
> 
> Steven Boada
> 
> Doctoral Student
> Dept of Physics and Astronomy
> Texas A&M University
> [email protected]
> 
> 
> --
> Master SQL Server Development, Administration, T-SQL, SSAS, SSIS, SSRS
> and more. Get SQL Server skills now (including 2012) with LearnDevNow -
> 200+ hours of step-by-step video tutorials by Microsoft MVPs and experts.
> SALE $99.99 this month only - learn more at:
> http://p.sf.net/sfu/learnmore_122512
> ___
> Matplotlib-users mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/matplotlib-users


--
Master SQL Server Development, Administration, T-SQL, SSAS, SSIS, SSRS
and more. Get SQL Server skills now (including 2012) with LearnDevNow -
200+ hours of step-by-step video tutorials by Microsoft MVPs and experts.
SALE $99.99 this month only - learn more at:
http://p.sf.net/sfu/learnmore_122512
___
Matplotlib-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


[Matplotlib-users] Matplotlib, Tk, and multithreading

2013-03-13 Thread Oliver King
Hi,

I have a library which uses matplotlib to produce some plots. This library is 
called by a thread. However, python crashes with this error when it tries to 
plot something:

Tk_MacOSXSetupTkNotifier: first [load] of TkAqua has to occur in the main 
thread!

If I do as it says and call "window = Tkinter.Tk()" in the main thread before 
spawning the thread which calls the plotting routines, it works well until the 
program shuts down. When shutting down, I get a series of these messages (8 of 
them, to be precise):

Exception RuntimeError: RuntimeError('main thread is not in main loop',) in 
> 
ignored

Googling reveals to me that this is a problem with Tk: it doesn't like 
threading. I tried to force matplotlib to use a different backend with this 
command:
matplotlib.rcParams['backend'] = something_else
but it still crashes with the first error.

Has anyone encountered this problem before? How did you overcome it?

Cheers,
Oliver
--
Everyone hates slow websites. So do we.
Make your web apps faster with AppDynamics
Download AppDynamics Lite for free today:
http://p.sf.net/sfu/appdyn_d2d_mar
___
Matplotlib-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] Matplotlib, Tk, and multithreading

2013-03-14 Thread Oliver King
Hi Ben,

> Are you displaying the plots in the thread, or are you just saving the plots 
> directly?  If you are saving them directly, then you can set your backend to 
> be "Agg" and get rid of the Tkinter.Tk() call (and probably should get rid of 
> the import as well).  That way, matplotlib won't load up any gui toolkits at 
> all.

I'm saving the plots directly 
(plt.figure();plt.plot();plt.savefig();plt.close(fig)). 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. I don't explicitly import or use Tk 
anywhere in my code, so it seems that matplotlib is trying to load it anyway 
even when instructed to use a different backend.

I'm running Enthought Python 7.3-2 on Mac OS X 10.6.8. Note that this problem 
seems to be restricted to this particular operating system; when I run the code 
on CentOS, also using EPD 7.3-2, it does not crash.

Cheers,
Oliver


--
Everyone hates slow websites. So do we.
Make your web apps faster with AppDynamics
Download AppDynamics Lite for free today:
http://p.sf.net/sfu/appdyn_d2d_mar
___
Matplotlib-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] Matplotlib, Tk, and multithreading

2013-03-14 Thread Oliver King

> You must set the desired backend from the very begining and before
> importing pylab o pyplot.

That did it - I made the change in my .matplotlibrc file and it no longer 
crashes.

Thanks!
Oliver
--
Everyone hates slow websites. So do we.
Make your web apps faster with AppDynamics
Download AppDynamics Lite for free today:
http://p.sf.net/sfu/appdyn_d2d_mar
___
Matplotlib-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


[Matplotlib-users] problems installing matplotlib on OS X Lion

2011-09-03 Thread Lynn Oliver
After many unsuccessful attempts at getting matplotlib installed on OS X Lion, 
I ran across this page:
Installing Matplotlib on OS X 10.7 with Homebrew « Random Musings for the 
Digital Age

Following these instructions got me the closest I have been:

$ brew install python
$ brew install gfortran
$ brew install pkg-config
$ easy_install pip
$ pip install numpy
$ cd $HOME
$ git clone https://github.com/matplotlib/matplotlib.git
$ cd matplotlib
$ python setup.py build
$ python setup.py install

At the moment, I'm trying to get a script that was working on EPD 7.1 to work 
on Python 2.7.2.  I'm using the TkAgg backend.

The first messages I see when running the script are:

objc[68962]: Class TKApplication is implemented in both 
/Library/Frameworks/Tk.framework/Versions/8.5/Tk and 
/Library/Frameworks/Tk.framework/Versions/8.6/Tk. One of the two will be used. 
Which one is undefined.
objc[68962]: Class TKMenu is implemented in both 
/Library/Frameworks/Tk.framework/Versions/8.5/Tk and 
/Library/Frameworks/Tk.framework/Versions/8.6/Tk. One of the two will be used. 
Which one is undefined.
objc[68962]: Class TKContentView is implemented in both 
/Library/Frameworks/Tk.framework/Versions/8.5/Tk and 
/Library/Frameworks/Tk.framework/Versions/8.6/Tk. One of the two will be used. 
Which one is undefined.
objc[68962]: Class TKWindow is implemented in both 
/Library/Frameworks/Tk.framework/Versions/8.5/Tk and 
/Library/Frameworks/Tk.framework/Versions/8.6/Tk. One of the two will be used. 
Which one is undefined.

For both Tk and Tcl, ../Versions/Current points to 8.6.  

From there, everything is fine until it executes show(), when I get the 
following messages:

Exception in Tkinter callback
Traceback (most recent call last):
  File 
"/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-tk/Tkinter.py",
 line 1410, in __call__
return self.func(*args)
  File 
"/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/matplotlib/backends/backend_tkagg.py",
 line 236, in resize
self.show()
  File 
"/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/matplotlib/backends/backend_tkagg.py",
 line 240, in draw
tkagg.blit(self._tkphoto, self.renderer._renderer, colormode=2)
  File 
"/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/matplotlib/backends/tkagg.py",
 line 19, in blit
tk.call("PyAggImagePhoto", photoimage, id(aggimage), colormode, 
id(bbox_array))
TclError

Can anyone suggest how to resolve this problem?

Thanks,
Lynn--
Special Offer -- Download ArcSight Logger for FREE!
Finally, a world-class log management solution at an even better 
price-free! And you'll get a free "Love Thy Logs" t-shirt when you
download Logger. Secure your free ArcSight Logger TODAY!
http://p.sf.net/sfu/arcsisghtdev2dev___
Matplotlib-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] problems installing matplotlib on OS X Lion

2011-09-04 Thread Lynn Oliver
Bryan, thanks for the response.

I installed macports and the environment settings seem to be correct, but when 
I try "port help selfupdate" I get:
/opt/local/bin/port: line 4: /usr/bin/tclsh: No such file or directory
/opt/local/bin/port: line 4: exec: /usr/bin/tclsh: cannot execute: No such file 
or directory

I removed the installation of Tcl 8.6 and reinstalled ActiveTcl 8.5.10, but 
still get the same warnings.  

Matplotlib is now complaining about the missing Tcl8.6:

ImportError: 
dlopen(/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/matplotlib/backends/_tkagg.so,
 2): Library not loaded: /Library/Frameworks/Tcl.framework/Versions/8.6/Tcl.  

I am assuming that your unsuccessful install via macports was after you had 
macports working; do you know what version of Tcl was installed?

Macports fails with the same warnings after putting a link to tclsh8.5 in 
/usr/bin/tchsh.

I still seem to be running in circles.

Lynn




On Sep 3, 2011, at 10:46 PM, Bryan K Woods wrote:

> I had a problem getting with Lion as well. I was able to work around it by:
> 1) unsuccessfully trying to install matplotlib for python 2.7 via macports
> 2) then using easy_install to install matplotlib
> 
> Bryan K. Woods, Ph.D.
> Staff Scientist
> Atmospheric & Environmental Research, Inc.
> [email protected]
> 
> On Sep 4, 2011, at 1:06 AM, Lynn Oliver  wrote:
> 
>> After many unsuccessful attempts at getting matplotlib installed on OS X 
>> Lion, I ran across this page:
>> Installing Matplotlib on OS X 10.7 with Homebrew « Random Musings for the 
>> Digital Age
>> 
>> Following these instructions got me the closest I have been:
>> 
>> $ brew install python
>> $ brew install gfortran
>> $ brew install pkg-config
>> $ easy_install pip
>> $ pip install numpy
>> $ cd $HOME
>> $ git clone https://github.com/matplotlib/matplotlib.git
>> $ cd matplotlib
>> $ python setup.py build
>> $ python setup.py install
>> 
>> At the moment, I'm trying to get a script that was working on EPD 7.1 to 
>> work on Python 2.7.2.  I'm using the TkAgg backend.
>> 
>> The first messages I see when running the script are:
>> 
>> objc[68962]: Class TKApplication is implemented in both 
>> /Library/Frameworks/Tk.framework/Versions/8.5/Tk and 
>> /Library/Frameworks/Tk.framework/Versions/8.6/Tk. One of the two will be 
>> used. Which one is undefined.
>> objc[68962]: Class TKMenu is implemented in both 
>> /Library/Frameworks/Tk.framework/Versions/8.5/Tk and 
>> /Library/Frameworks/Tk.framework/Versions/8.6/Tk. One of the two will be 
>> used. Which one is undefined.
>> objc[68962]: Class TKContentView is implemented in both 
>> /Library/Frameworks/Tk.framework/Versions/8.5/Tk and 
>> /Library/Frameworks/Tk.framework/Versions/8.6/Tk. One of the two will be 
>> used. Which one is undefined.
>> objc[68962]: Class TKWindow is implemented in both 
>> /Library/Frameworks/Tk.framework/Versions/8.5/Tk and 
>> /Library/Frameworks/Tk.framework/Versions/8.6/Tk. One of the two will be 
>> used. Which one is undefined.
>> 
>> For both Tk and Tcl, ../Versions/Current points to 8.6.  
>> 
>> From there, everything is fine until it executes show(), when I get the 
>> following messages:
>> 
>> Exception in Tkinter callback
>> Traceback (most recent call last):
>>   File 
>> "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-tk/Tkinter.py",
>>  line 1410, in __call__
>> return self.func(*args)
>>   File 
>> "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/matplotlib/backends/backend_tkagg.py",
>>  line 236, in resize
>> self.show()
>>   File 
>> "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/matplotlib/backends/backend_tkagg.py",
>>  line 240, in draw
>> tkagg.blit(self._tkphoto, self.renderer._renderer, colormode=2)
>>   File 
>> "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/matplotlib/backends/tkagg.py",
>>  line 19, in blit
>> tk.call("PyAggImagePhoto", photoimage, id(aggimage), colormode, 
>> id(bbox_array))
>> TclError
>> 
>> Can anyone suggest how to resolve this problem?
>> 
>> Thanks,
>> Lynn
>> --
>> Special Offer -- Download ArcSight Logger for FREE!
>> Finally, a world-class log management solution at an even better 
>> price-free! And you'll get a free "Love Thy Logs" t-

Re: [Matplotlib-users] problems installing matplotlib on OS X Lion

2011-09-04 Thread Lynn Oliver
I don't know about changing backends, but I do need to use TkAgg.

I finally got it working.  The instructions from the original email below are 
what worked, but first I had to uninstall Tcl8.6 (manually).  The first time I 
tried it I deleted something that I shouldn't have, and ended up with a mess 
that I cleaned up by doing a full erase/reinstall of Lion.  Then I restored the 
system from a backup, carefully removed Tcl8.6 manually (the uninstall script 
is broken), removed most of the remnants of macports, reinstalled a few things 
that were broken by the reinstall of Lion (XCode, XQuartz, WingIDE, 
TextWrangler), uninstalled and reinstalled Python 2.7.2, reinstalled Tcl8.5, 
and rebuilt matplotlib per the instructions.

Hopefully it will go much smoother when I set up the new system in a few days.

Thanks for your help...
Lynn

On Sep 4, 2011, at 12:55 AM, Michiel de Hoon wrote:

> What happens if you use the MacOSX backend instead of TkAgg? Or do you have 
> to use TkAgg?
> 
> --Michiel.
> 
> --- On Sun, 9/4/11, Lynn Oliver  wrote:
> 
> From: Lynn Oliver 
> Subject: Re: [Matplotlib-users] problems installing matplotlib on OS X Lion
> To: "Bryan K Woods" 
> Cc: "[email protected]" 
> 
> Date: Sunday, September 4, 2011, 3:38 AM
> 
> Bryan, thanks for the response.
> 
> I installed macports and the environment settings seem to be correct, but 
> when I try "port help selfupdate" I get:
> /opt/local/bin/port: line 4: /usr/bin/tclsh: No such file or directory
> /opt/local/bin/port: line 4: exec: /usr/bin/tclsh: cannot execute: No such 
> file or directory
> 
> I removed the installation of Tcl 8.6 and reinstalled ActiveTcl 8.5.10, but 
> still get the same warnings.  
> 
> Matplotlib is now complaining about the missing Tcl8.6:
> 
> ImportError: 
> dlopen(/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/matplotlib/backends/_tkagg.so,
>  2): Library not loaded: /Library/Frameworks/Tcl.framework/Versions/8.6/Tcl.  
> 
> I am assuming that your unsuccessful install via macports was after you had 
> macports working; do you know what version of Tcl was installed?
> 
> Macports fails with the same warnings after putting a link to tclsh8.5 in 
> /usr/bin/tchsh.
> 
> I still seem to be running in circles.
> 
> Lynn
> 
> 
> 
> 
> On Sep 3, 2011, at 10:46 PM, Bryan K Woods wrote:
> 
>> I had a problem getting with Lion as well. I was able to work around it by:
>> 1) unsuccessfully trying to install matplotlib for python 2.7 via macports
>> 2) then using easy_install to install matplotlib
>> 
>> Bryan K. Woods, Ph.D.
>> Staff Scientist
>> Atmospheric & Environmental Research, Inc.
>> [email protected]
>> 
>> On Sep 4, 2011, at 1:06 AM, Lynn Oliver  wrote:
>> 
>>> After many unsuccessful attempts at getting matplotlib installed on OS X 
>>> Lion, I ran across this page:
>>> Installing Matplotlib on OS X 10.7 with Homebrew « Random Musings for the 
>>> Digital Age
>>> 
>>> Following these instructions got me the closest I have been:
>>> 
>>> $ brew install python
>>> $ brew install gfortran
>>> $ brew install pkg-config
>>> $ easy_install pip
>>> $ pip install numpy
>>> $ cd $HOME
>>> $ git clone https://github.com/matplotlib/matplotlib.git
>>> $ cd matplotlib
>>> $ python setup.py build
>>> $ python setup.py install
>>> 
>>> At the moment, I'm trying to get a script that was working on EPD 7.1 to 
>>> work on Python 2.7.2.  I'm using the TkAgg backend.
>>> 
>>> The first messages I see when running the script are:
>>> 
>>> objc[68962]: Class TKApplication is implemented in both 
>>> /Library/Frameworks/Tk.framework/Versions/8.5/Tk and 
>>> /Library/Frameworks/Tk.framework/Versions/8.6/Tk. One of the two will be 
>>> used. Which one is undefined.
>>> objc[68962]: Class TKMenu is implemented in both 
>>> /Library/Frameworks/Tk.framework/Versions/8.5/Tk and 
>>> /Library/Frameworks/Tk.framework/Versions/8.6/Tk. One of the two will be 
>>> used. Which one is undefined.
>>> objc[68962]: Class TKContentView is implemented in both 
>>> /Library/Frameworks/Tk.framework/Versions/8.5/Tk and 
>>> /Library/Frameworks/Tk.framework/Versions/8.6/Tk. One of the two will be 
>>> used. Which one is undefined.
>>> objc[68962]: Class TKWindow is implemented in both 
>>> /Library/Frameworks/Tk.framework/Versions/8.5/Tk and 
>>> /Library/Frameworks/Tk.framework/Versions/8.6/Tk. One of the two will b

[Matplotlib-users] axis not accepting keyword arguments any longer?

2007-01-09 Thread Marcel Oliver
Hi, I am running some code which used to work a couple of months ago,
but now fails on the "axis" command which does not seem to accept
keyword arguments any longer (current version 0.87.7 from Fedora
Extras, previous version probably 0.87.4 or so).  Traceback is
below...

Any ideas?

Thanks,
Marcel


/home/marcel/src/python/advection/paper1/colonius.py in colonius(Q, full)
 93 figure ()
 94 xlabel (r'$\xi$')
---> 95 axis (xmin=0, xmax=pi)
 96 plot (xxiplot, omega(xxiplot), "k-",
 97   xxiplot, dwdxi (xxiplot), "k--",

/usr/lib/python2.4/site-packages/matplotlib/pylab.py in axis(*v, **kwargs)
622 """
623 ax = gca()
--> 624 v = ax.axis(*v, **kwargs)
625 draw_if_interactive()
626 return v

/usr/lib/python2.4/site-packages/matplotlib/axes.py in axis(self, *v, **kwargs)
775 except IndexError:
776 xmin, xmax = self.set_xlim(**kwargs)
--> 777 ymin, ymax = self.set_ylim(**kwargs)
778 return xmin, xmax, ymin, ymax
779 

TypeError: set_ylim() got an unexpected keyword argument 'xmin'
WARNING: Failure executing file: 


-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
___
Matplotlib-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


[Matplotlib-users] Opensuse RPMs

2007-03-08 Thread Marcel Oliver
Dear all:

I am trying the numpy-scipy-matplotlib stack on Opensuse 10.2 from

  http://repos.opensuse.org/science/openSUSE_10.2/i586/

No success with matplotlib, however.  Two problems:

- No plot windows open at all

- When using TeX ouput, ghostscript segfaults:

  sh: line 1: 11319 Segmentation fault  gs -dBATCH -dNOPAUSE -r6000 
-sDEVICE=pswrite -sPAPERSIZE=letter 
-sOutputFile="/tmp/ef684d47fbac423478eccceef602c8ca.ps" 
"/tmp/ef684d47fbac423478eccceef602c8ca" 
>"/tmp/ef684d47fbac423478eccceef602c8ca.output"

So in short, nothing works.  Has anybody been successfully running
this RPM?  (Background: This is for the teaching lab computers at my
university where I'd like to experiment with in-class use of scipy.  I
have an agreement with the sysadmin that he'd install
numpy-scipy-matplotlib if it runs "out-of-the-box" from a standard
repository without any manual fiddling.  Otherwise, I'd be out of
luck.  On my personal workstation I run Fedora where I never had any
problem with the "official" RPMs from Fedora Extra...)

Regards,
Marcel

PS.: Yes, I got past the BLAS/Lapack problem.  Short answer: Don't use
the official blas and lapack packages from Suse, they are incomplete.
Use the RPMs from the repository above.



-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
___
Matplotlib-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] Opensuse RPMs

2007-03-14 Thread Marcel Oliver
Werner Hoch writes:
 > What is Tex output? Do you mean postscript or eps?
 > 
 > >   sh: line 1: 11319 Segmentation fault  gs -dBATCH -dNOPAUSE
 > > -r6000 -sDEVICE=pswrite -sPAPERSIZE=letter
 > > -sOutputFile="/tmp/ef684d47fbac423478eccceef602c8ca.ps"
 > > "/tmp/ef684d47fbac423478eccceef602c8ca"
 > > >"/tmp/ef684d47fbac423478eccceef602c8ca.output"

OK, so I have updated to the latest RPMs and investigated a bit
further.  The gs segfault occurs when setting "usetex=True" AND trying
to save to an eps figure.

Demonstration: take tex_demo.py from the examples collection on the
matplotlib site.  It runs OK.  Now change savefig('tex_demo') to
savefig('tex_demo.eps').  Boom.

Probably a bug with the Suse gs rather than matplotlib, but pretty
annoying anyway because one would like to produce eps rather than
bitmapped figures for publication quality images.

 > Can you please provide some informations about your setup?
 > OS = SuSE 10.2
 > arch = i586

python shell = ipython or even the standard python interpreter

 > backend your trying to use (Agg is default, set it to TkAgg if you like 
 > to use matplotlib interactively)
 > interactive value in matplotlibrc

OK, here is the problem.  With the latest RPM I get

[EMAIL PROTECTED]:~/Desktop/examples> ipython -pylab
[Lots of backtrace...]
ImportError: No module named wx

Missing dependency?  In any case, after setting the backend to GTKAgg
in matplotlibrc, everything works.  I believe that's also the default
in the Fedora RPM.

The following tests with GTKAgg backend setting:

 > Minimum Testcode for matplotlib:
 > ---
 > from pylab import *
 > 
 > a = arange(0,10,0.01)
 > plot(a, sin(a))
 > grid()
 > savefig("abc.png")
 > ---
 > Does it work?

Yes.

 > Testcode for postscript:
 > ---
 > from pylab import *
 > 
 > a = arange(0,10,0.01)
 > plot(a, sin(a))
 > grid()
 > savefig("abc.ps")
 > ---
 > Does it work?

Yes.

OK, so boiled the problem with usetex=True down to the following pair
of working vs. nonworking code.  Wierd.

File working.py:


#!/usr/bin/env python
from pylab import *
 
rc('text', usetex=True)
a = arange(0,10,0.01)
plot(a, sin(a))
grid()
savefig("abc.ps")

show()

File nonworking.py:
===

#!/usr/bin/env python
from pylab import *
 
rc('text', usetex=True)
a = arange(0,10,0.01)
plot(a, sin(a)+2)
savefig("abc.ps")

show()

 > After changing the settings for the backend and interactive mode.
 > Does the following code produce a plot when entered into a shell?
 > -
 > from pylab import *
 > plot([1,2,3,3,2,3])
 > -

As descibed above, changing backend is necessary to do anything...
Did not systematically try all the backends.  Would be nice if the
default was working.

 > Can you provide the version of your Fedora and the Version of the 
 > matplotlib package?
 > It would be much easier to track the differences and fix the package.

http://mirrors.usc.edu/pub/linux/distributions/fedora/extras/6/SRPMS/python-matplotlib-0.87.7-3.fc6.src.rpm

Thanks a lot,
Marcel


-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
___
Matplotlib-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] matlab, idle, interactivity and teaching

2007-03-30 Thread oliver . tomic
Mark,

you can set ipython (in the ipythonrc.ini) to start up the editor of your
choice when you type "edit" in the ipython-shell.

Check out this video at ShowMeDo, that shows a lot of the features of
ipython:
http://showmedo.com/videos/video?name=DownloadingIPythonForMSWindows&fromSeriesID=2

Oliver


[EMAIL PROTECTED] wrote on 30.03.2007
16:48:24:

> I always thought ipython didn't come with a good editor.
> Am I mistaken?
> Mark

> On 3/30/07, Lou Pecora < [EMAIL PROTECTED]> wrote:
> Have you looked at iPython?  I think it's a great way
> to go.  Check it out.
>
> --- Mark Bakker <[EMAIL PROTECTED]> wrote:
>
> > Giorgio -
> >
> > Thanks for starting this discussion and sorry for
> > the late reply.
> > Use of Python with matplotlib in the classroom and
> > by students in general is
> > a major objective of mine.
> >
> > I use IDLE with numpy, scipy, and matplotlib.
> >
> > The IDLE problem is really annoying though.
>
> [cut]
>
>
>
> -- Lou Pecora,   my views are my own.
> ---
> "I knew I was going to take the wrong train, so I left early."
> --Yogi Berra
>
>
>
>


> Be a PS3 game guru.
> Get your game face on with the latest PS3 news and previews at Yahoo!
Games.
> http://videogames.yahoo.com/platform?platform=120121
> -
> Take Surveys. Earn Cash. Influence the Future of IT
> Join SourceForge.net's Techsay panel and you'll get the chance to share
your
> opinions on IT & business topics through brief surveys-and earn cash
> http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
> ___
> Matplotlib-users mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/matplotlib-users


-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
___
Matplotlib-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


[Matplotlib-users] problems with vlines after upgrading to 0.87.3

2006-06-29 Thread Oliver Tomic
  Hi list,  Platform: Windows XP  upgrading from matplotlib 0.83.1 to 0.87.3  On my PC the vline_demo.py from the examples doesn't work anymore after  upgrading from 0.83.1 to 0.87.3. I use vlines in my application where I get  the same type of error. It worked just fine with 0.83.1.  Traceback (most recent call last):  File "C:\Python24\Lib\site-packages\matplotlib\examples\vline_demo.py",  line 17, in ?  vlines(t, [0], s, color='k')  File "C:\Python24\Lib\site-packages\matplotlib\pylab.py", line 2242, in  vlines  ret = gca().vlines(*args, **kwargs)  File "C:\Python24\Lib\site-packages\matplotlib\axes.py", line 1987, in  vlines  color=color, linestyle=linestyle, marker=marker,  TypeError: Line2D constructor got multiple values for keyword argument 
 'color'     Any ideas?  Thanks for your help in advance!     cheers  Oliver 
		Talk is cheap. Use Yahoo! Messenger to make PC-to-Phone calls.  Great rates starting at 1¢/min.Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
___
Matplotlib-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


[Matplotlib-users] problems with vlines after upgrading to 0.87.3

2006-06-29 Thread Oliver Tomic
  Hi list,  Platform: Windows XP  upgrading from matplotlib 0.83.1 to 0.87.3  On my PC the vline_demo.py from the examples doesn't work anymore after  upgrading from 0.83.1 to 0.87.3. I use vlines in my application where I get  the same type of error. It worked just fine with 0.83.1.  Traceback (most recent call last):  File "C:\Python24\Lib\site-packages\matplotlib\examples\vline_demo.py",  line 17, in ?  vlines(t, [0], s, color='k')  File "C:\Python24\Lib\site-packages\matplotlib\pylab.py", line 2242, in  vlines  ret = gca().vlines(*args, **kwargs)  File "C:\Python24\Lib\site-packages\matplotlib\axes.py", line 1987, in  vlines  color=color, linestyle=linestyle, marker=marker,  TypeError: Line2D constructor got multiple values for keyword argument 
 'color'     Any ideas?  Thanks for your help in advance!     cheers  Oliver 
		Yahoo! Music Unlimited - Access over 1 million songs.
Try it free. Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
___
Matplotlib-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] ANN: matplotlib-0.87.5 *fixed*

2006-09-07 Thread oliver . tomic
Hi list,

I downloaded the latest version from the link (see under). With 0.87.3 our
application worked fine, but with with 0.87.5 we get the following:

Traceback (most recent call last):
  File "C:\Python24\PanelCheck_V.1.1.0\PanelCheck.py", line 222, in ?
import PanelCheck_GUI
  File "C:\Python24\PanelCheck_V.1.1.0\PanelCheck_GUI.py", line 10, in ?
from Line_Plot import *
  File "C:\Python24\PanelCheck_V.1.1.0\Line_Plot.py", line 3, in ?
from Plot_Setup import *
  File "C:\Python24\PanelCheck_V.1.1.0\Plot_Setup.py", line 9, in ?
from matplotlib.backends.backend_wxagg import FigureCanvasWxAgg as
FigureCanvas
  File
"C:\Python24\Lib\site-packages\matplotlib\backends\backend_wxagg.py", line
21, in ?
from matplotlib.figure import Figure
  File "C:\Python24\Lib\site-packages\matplotlib\figure.py", line 5, in ?
from artist import Artist
  File "C:\Python24\Lib\site-packages\matplotlib\artist.py", line 4, in ?
from transforms import identity_transform
  File "C:\Python24\Lib\site-packages\matplotlib\transforms.py", line 223,
in ?
from _transforms import Value, Point, Interval, Bbox, Affine
  File "C:\Python24\Lib\site-packages\matplotlib\_transforms.py", line 1,
in ?
import sys, numerix
  File "C:\Python24\Lib\site-packages\matplotlib\numerix\__init__.py", line
145, in ?
__import__('fft', g, l)
  File "C:\Python24\Lib\site-packages\matplotlib\numerix\fft\__init__.py",
line 11, in ?
from numpy.dft.old import *
ImportError: No module named old

Thanks
Oliver





[EMAIL PROTECTED] wrote on 06.09.2006
21:20:39:

> Sorry all for the error.  I just uploaded "working" (at least for me)
> versions to sourceforge again.  For those who are sicking of playing
> with mirrors here is a direct download.  Don't expect this link to be
> good for a long time though.
>
> http://euclid.uits.iupui.edu/mplfiles/
>
> - Charlie
>
> On 9/6/06, Charlie Moad <[EMAIL PROTECTED]> wrote:
> > The source error must of propagated to those builds.  I will post new
> > ones shortly.
> >
> > On 9/6/06, Sven Schreiber <[EMAIL PROTECTED]> wrote:
> > > Well the thread on the devel list that I referred to explicitly has
the
> > > win32 exe in its title ("Missing __init__.py in
> > > matplotlib-0.87.5.win32-py2.4.exe ?") . The starting post there
pretty
> > > much says it all.
> > >
> > > There's also a recent post on the numpy list that sounds like it's
maybe
> > > the same problem (quote):
> > > """
> > > Is there a compatible matplotlib as well?  I was o.k. with mpl from
> > > enthought until I switched numerix to numpy.  That made mpl unhappy.
> > > I downloaded 0.87.5 but I broke something in the process because now
> > > even switching back to Numeric doesn't make mpl happy.
> > > """
> > >
> > > Thanks,
> > > Sven
> > >
> > > Charlie Moad schrieb:
> > > > That error was relating to the source release.  Can you please post
> > > > your error for the binary?
> > > >
> > > > On 9/6/06, Sven Schreiber <[EMAIL PROTECTED]> wrote:
> > > >> Charlie Moad schrieb:
> > > >> > Minor rev bump for numpy 1.0b5 compatibility.  This release
should
> > > >> > remain compatible with future 1.0 releases of numpy.
> > > >> >
> > > >>
> > > >> I keep running into the ImportError problem described on the
> devel list,
> > > >> with the win32 2.4 binary (exe). Is that still just a case of
waiting
> > > >> for the mirrors to update, or is there a deeper problem? Are there
> > > >> alternative download links? How to tell whether it's the
> "right" binary,
> > > >> since version numbers are the same?
> > > >>
> > > >> Thanks for your help,
> > > >> Sven
> > > >>
> > > >
> > >
> > >
> >
>
> -
> Using Tomcat but need to do more? Need to support web services, security?
> Get stuff done quickly with pre-integrated technology to make your job
easier
> Download IBM WebSphere Application Server v.1.0.1 based on Apache
Geronimo
> http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
> ___
> Matplotlib-users mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/matplotlib-users


-
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
___
Matplotlib-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] ANN: matplotlib-0.87.5 *fixed*

2006-09-07 Thread oliver . tomic
Hi Charlie,

I am sorry about this. I confused the installations on my workstation at
work and those on my laptop. You are right, on my workstation at work I had
only nympy 0.9.8. Works like a dream after updating to numpy 1.0b5.

Oliver

"Charlie Moad" <[EMAIL PROTECTED]> wrote on 07.09.2006 14:19:47:

> Did you upgrade your numpy to 1.0b5?  This is required.
>
> On 9/7/06, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
> > Hi list,
> >
> > I downloaded the latest version from the link (see under). With 0.87.3
our
> > application worked fine, but with with 0.87.5 we get the following:
> >
> > Traceback (most recent call last):
> >   File "C:\Python24\PanelCheck_V.1.1.0\PanelCheck.py", line 222, in ?
> > import PanelCheck_GUI
> >   File "C:\Python24\PanelCheck_V.1.1.0\PanelCheck_GUI.py", line 10, in
?
> > from Line_Plot import *
> >   File "C:\Python24\PanelCheck_V.1.1.0\Line_Plot.py", line 3, in ?
> > from Plot_Setup import *
> >   File "C:\Python24\PanelCheck_V.1.1.0\Plot_Setup.py", line 9, in ?
> > from matplotlib.backends.backend_wxagg import FigureCanvasWxAgg as
> > FigureCanvas
> >   File
> > "C:\Python24\Lib\site-packages\matplotlib\backends\backend_wxagg.py",
line
> > 21, in ?
> > from matplotlib.figure import Figure
> >   File "C:\Python24\Lib\site-packages\matplotlib\figure.py", line 5, in
?
> > from artist import Artist
> >   File "C:\Python24\Lib\site-packages\matplotlib\artist.py", line 4, in
?
> > from transforms import identity_transform
> >   File "C:\Python24\Lib\site-packages\matplotlib\transforms.py", line
223,
> > in ?
> > from _transforms import Value, Point, Interval, Bbox, Affine
> >   File "C:\Python24\Lib\site-packages\matplotlib\_transforms.py", line
1,
> > in ?
> > import sys, numerix
> >   File "C:\Python24\Lib\site-packages\matplotlib\numerix\__init__.py",
line
> > 145, in ?
> > __import__('fft', g, l)
> >   File
"C:\Python24\Lib\site-packages\matplotlib\numerix\fft\__init__.py",
> > line 11, in ?
> > from numpy.dft.old import *
> > ImportError: No module named old
> >
> > Thanks
> > Oliver
> >
> >
> >
> >
> >
> > [EMAIL PROTECTED] wrote on 06.09.2006
> > 21:20:39:
> >
> > > Sorry all for the error.  I just uploaded "working" (at least for me)
> > > versions to sourceforge again.  For those who are sicking of playing
> > > with mirrors here is a direct download.  Don't expect this link to be
> > > good for a long time though.
> > >
> > > http://euclid.uits.iupui.edu/mplfiles/
> > >
> > > - Charlie
> > >
> > > On 9/6/06, Charlie Moad <[EMAIL PROTECTED]> wrote:
> > > > The source error must of propagated to those builds.  I will post
new
> > > > ones shortly.
> > > >
> > > > On 9/6/06, Sven Schreiber <[EMAIL PROTECTED]> wrote:
> > > > > Well the thread on the devel list that I referred to explicitly
has
> > the
> > > > > win32 exe in its title ("Missing __init__.py in
> > > > > matplotlib-0.87.5.win32-py2.4.exe ?") . The starting post there
> > pretty
> > > > > much says it all.
> > > > >
> > > > > There's also a recent post on the numpy list that sounds like
it's
> > maybe
> > > > > the same problem (quote):
> > > > > """
> > > > > Is there a compatible matplotlib as well?  I was o.k. with mpl
from
> > > > > enthought until I switched numerix to numpy.  That made mpl
unhappy.
> > > > > I downloaded 0.87.5 but I broke something in the process because
now
> > > > > even switching back to Numeric doesn't make mpl happy.
> > > > > """
> > > > >
> > > > > Thanks,
> > > > > Sven
> > > > >
> > > > > Charlie Moad schrieb:
> > > > > > That error was relating to the source release.  Can you please
post
> > > > > > your error for the binary?
> > > > > >
> > > > > > On 9/6/06, Sven Schreiber <[EMAIL PROTECTED]> wrote:
> > > > > >> Charlie Moad schrieb:
> > > > > >> > Minor rev bump for numpy 1.0b5 compatibility.  This release
> > should
> > > > > >> > remain compat