[Matplotlib-users] How do I disable antialiasing on imshow with wxagg backend ?

2006-09-17 Thread Daniel Kornhauser
I know I should find this in the documentation, but I am finding all 
kinds of bells and whistles about the interpolation and the fancy agg 
features except how to disable antialiasing .

Sorry for the newbie question.
 
  
Daniel.

-
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
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


[Matplotlib-users] Label & ticks spacing

2006-09-17 Thread Zack
Hi, all

how to change the spacing between axes and ticks labels, ticks labels and axes 
labels?
I mean vertical spacing for X axis and horizontal one for Y.

Thanks,

-- 
Alexey

-
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
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] Label & ticks spacing

2006-09-17 Thread John Hunter
> "Zack" == Zack  <[EMAIL PROTECTED]> writes:

Zack> Hi, all how to change the spacing between axes and ticks
Zack> labels, ticks labels and axes labels?  I mean vertical
Zack> spacing for X axis and horizontal one for Y.

See these parameters from your matplotlibrc file:
http://matplotlib.sf.net/matplotlibrc

  xtick.major.pad  : 4  # distance to major tick label in points
  xtick.minor.pad  : 4  # distance to the minor tick label in points
  ytick.major.pad  : 4  # distance to major tick label in points
  ytick.minor.pad  : 4  # distance to the minor tick label in points

>From code, you can also control the pad with, for example, 

for tick in ax.xaxis.get_major_ticks():
tick.set_pad(6)

ditto for the yaxis and minor ticks..

JDH


-
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
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] How do I disable antialiasing on imshow with wxagg backend ?

2006-09-17 Thread John Hunter
> "Daniel" == Daniel Kornhauser <[EMAIL PROTECTED]> writes:

Daniel> I know I should find this in the documentation, but I am
Daniel> finding all kinds of bells and whistles about the
Daniel> interpolation and the fancy agg features except how to
Daniel> disable antialiasing .

When you say antialiasing, do you mean interpolation?  AFAIK,
antialiasing doesn't really come into play on the images.  

Perhaps what you want is

ax.imshow(nx.mlab.rand(10,10), interpolation='nearest')

JDH

-
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
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] Label & ticks spacing

2006-09-17 Thread Zack
Hi,
Thanks for your help.

On Sunday 17 September 2006 16:54, John Hunter wrote:

> From code, you can also control the pad with, for example,
> for tick in ax.xaxis.get_major_ticks():
> tick.set_pad(6)
And how do I do same thing with labels?
They are instances of Text object not ticks.

-- 
Alexey

-
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
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] Label & ticks spacing

2006-09-17 Thread John Hunter
> "Zack" == Zack  <[EMAIL PROTECTED]> writes:

Zack> Hi, Thanks for your help.

Zack> On Sunday 17 September 2006 16:54, John Hunter wrote:

>> From code, you can also control the pad with, for example, for
>> tick in ax.xaxis.get_major_ticks(): tick.set_pad(6)
Zack> And how do I do same thing with labels?  They are instances
Zack> of Text object not ticks.

The tick labels are part of the Tick, so this setting will affect
them.  The Axis labels are automatically placed to be below (or to the
left of) the tick labels.  So it may be enough to simply set the pad.

JDH

-
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
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


[Matplotlib-users] compile error with python2.5

2006-09-17 Thread Achim Gaedke
While compiling matplotlib-0.87.5 with python-2.5 on debian testing some
errors occured:

gcc: src/agg.cxx
cc1plus: warning: command line option "-Wstrict-prototypes" is valid for
Ada/C/ObjC but not for C++
src/agg.cxx: In function 'int SWIG_Python_ConvertPtr(PyObject*, void**,
swig_type_info*, int)':
src/agg.cxx:1231: error: invalid conversion from 'const char*' to 'char*'
src/agg.cxx: In function 'void SWIG_Python_FixMethods(PyMethodDef*,
swig_const_info*, swig_type_info**, swig_type_info**)':
src/agg.cxx:27624: error: invalid conversion from 'const char*' to 'char*'
cc1plus: warning: command line option "-Wstrict-prototypes" is valid for
Ada/C/ObjC but not for C++
src/agg.cxx: In function 'int SWIG_Python_ConvertPtr(PyObject*, void**,
swig_type_info*, int)':
src/agg.cxx:1231: error: invalid conversion from 'const char*' to 'char*'
src/agg.cxx: In function 'void SWIG_Python_FixMethods(PyMethodDef*,
swig_const_info*, swig_type_info**, swig_type_info**)':
src/agg.cxx:27624: error: invalid conversion from 'const char*' to 'char*'
error: Command "gcc -pthread -fno-strict-aliasing -DNDEBUG -g -O3 -Wall
-Wstrict-prototypes -fPIC -Iagg23/include -Isrc -Iswig
-I/home/achim/local/include/python2.5 -c src/agg.cxx -o
build/temp.linux-i686-2.5/src/agg.o" failed with exit status 1


similar errors occured in src/swig_runtime.h

src/swig_runtime.h: In function 'int SWIG_Python_ConvertPtr(PyObject*,
void**, swig_type_info*, int)':
src/swig_runtime.h:1140: error: invalid conversion from 'const char*' to
'char*'

a fix is attached.

Achim
diff -u -x '*.pyc' -x '_n?_*' -r matplotlib-0.87.5/src/agg.cxx 
matplotlib-0.87.5_fixed/src/agg.cxx
--- matplotlib-0.87.5/src/agg.cxx   2006-07-19 04:37:19.0 +0200
+++ matplotlib-0.87.5_fixed/src/agg.cxx 2006-09-17 22:46:48.0 +0200
@@ -1228,7 +1228,7 @@
 obj = pyobj;
 if (PyCFunction_Check(obj)) {
   /* here we get the method pointer for callbacks */
-  char *doc = (((PyCFunctionObject *)obj) -> m_ml -> ml_doc);
+  const char *doc = (((PyCFunctionObject *)obj) -> m_ml -> ml_doc);
   c = doc ? strstr(doc, "swig_ptr: ") : 0;
   if (c) {
c = ty ? SWIG_UnpackVoidPtr(c + 10, &vptr, ty->name) : 0;
@@ -27621,11 +27621,11 @@
 swig_type_info **types_initial) {
 size_t i;
 for (i = 0; methods[i].ml_name; ++i) {
-char *c = methods[i].ml_doc;
+const char *c = methods[i].ml_doc;
 if (c && (c = strstr(c, "swig_ptr: "))) {
 int j;
 swig_const_info *ci = 0;
-char *name = c + 10;
+const char *name = c + 10;
 for (j = 0; const_table[j].type; ++j) {
 if (strncmp(const_table[j].name, name, 
 strlen(const_table[j].name)) == 0) {
diff -u -x '*.pyc' -x '_n?_*' -r matplotlib-0.87.5/src/swig_runtime.h 
matplotlib-0.87.5_fixed/src/swig_runtime.h
--- matplotlib-0.87.5/src/swig_runtime.h2006-07-24 14:19:12.0 
+0200
+++ matplotlib-0.87.5_fixed/src/swig_runtime.h  2006-09-17 22:52:16.0 
+0200
@@ -1137,7 +1137,7 @@
 obj = pyobj;
 if (PyCFunction_Check(obj)) {
   /* here we get the method pointer for callbacks */
-  char *doc = (((PyCFunctionObject *)obj) -> m_ml -> ml_doc);
+  const char *doc = (((PyCFunctionObject *)obj) -> m_ml -> ml_doc);
   c = doc ? strstr(doc, "swig_ptr: ") : 0;
   if (c) {
c = ty ? SWIG_UnpackVoidPtr(c + 10, &vptr, ty->name) : 0;
-
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
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


[Matplotlib-users] How do I take off the gray border padding from a figure ?

2006-09-17 Thread Daniel Kornhauser
Hi:

Thanks for you last reply John you where right on.

Yet another newbie question, how do I take off the frame off ?

I have tried frameon=False, and played with the figsize and dpi, and I 
just can't get rid of the gray (or white) border around my image. I want 
the image to expand to take on the whole sizer I can't afford the 
padding on the side.

This is how I am adding my image to the figure:
(I don't know if I should be using add_subplot(111) ? )

figure = Figure()
self.axes = figure.add_subplot(111)
self.axes.imshow(self.image, interpolation='nearest')
self.axes.axis('off')


  Thanks.

 
Daniel.

-
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
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] Label & ticks spacing

2006-09-17 Thread Zack
Hi, John!

On Sunday 17 September 2006 19:26, John Hunter wrote:

> The tick labels are part of the Tick, so this setting will affect
> them.  The Axis labels are automatically placed to be below (or to the
> left of) the tick labels.  So it may be enough to simply set the pad.

I have found the parameter I need.
It was placed inside of Axis class definition.

--
class Axis(Artist):

"""
Public attributes
  transData - transform data coords to display coords
  transAxis - transform axis coords to display coords

"""
LABELPAD = 5
--

I'm wondering if it might be possible to release this parameter, that
anyone could adjust it according his needs.

It will make matplotlib even more flexible.

Thanks for the great lib!

-- 
Alexey

-
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
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


[Matplotlib-users] C library problems on Windows: Enthought python 2.4.3 and matplotlib 0.87.5

2006-09-17 Thread Don Peterson




For my
Windows XP machine, I downloaded enthon-python2.4-1.0.0.exe and
matplotlib-0.87.5.win32-py2.4.exe.  I installed python first (it's
version 2.4.3) via the Enthought executable; it installed fine with no
errors.  Then matplotlib installed fine with no errors.

I installed the matplotlib_examples_0.87.1.zip examples and tried to
run the barchart_demo.py script; here's the error message I got:

RuntimeError: module compiled against
version 102 of C-API but this version
of numpy is 90907

The import of the numpy version of the nxutils module,
_nsnxutils, failed.  This is is either because numpy was
unavailable when matplotlib was compiled, because a dependency of
_nsnxutils could not be satisfied, or because the build flag for
this module was turned off in setup.py.  If it appears that
_nsnxutils was not built, make sure you have a working copy of
numpy and then re-install matplotlib. Otherwise, the following
traceback gives more details:

Traceback (most recent call last):
  File "barchart_demo.py", line 3, in ?
    from pylab import *
  File "C:\bin\PYTHON~1\Lib\site-packages\pylab.py", line 1, in ?
    from matplotlib.pylab import *
  File "C:\bin\PYTHON~1\Lib\site-packages\matplotlib\pylab.py", line
198, in ?
    import mlab  #so I can override hist, psd, etc...
  File "C:\bin\PYTHON~1\Lib\site-packages\matplotlib\mlab.py", line 64,
in ?
    import nxutils
  File "C:\bin\PYTHON~1\Lib\site-packages\matplotlib\nxutils.py", line
17, in ?
    from matplotlib._ns_nxutils import *
ImportError: numpy.core.multiarray failed to import

The
following shows I can import numpy OK:

--> python
Python 2.4.3 - Enthought Edition 1.0.0 (#69, Aug  2 2006, 12:09:59)
[MSC v.1310
32 bit (Intel)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> from numpy import *
>>>

I would very much like to be able to use matplotlib, as it looks much
better suited to my needs than gnuplot.  Any ideas on how to address
this problem?






-
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
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] Label & ticks spacing

2006-09-17 Thread John Hunter
> "Zack" == Zack  <[EMAIL PROTECTED]> writes:

Zack> """ Public attributes transData - transform data coords
Zack> to display coords transAxis - transform axis coords to
Zack> display coords

Zack> """ LABELPAD = 5 --

You can use it:

  ax.xaxis.LABELPAD = 10  
  ax.yaxis.LABELPAD = 10  

We could make it a property and rc param, though, so it is consistent
with the rest of the API.

JDH

-
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
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] C library problems on Windows: Enthought python 2.4.3 and matplotlib 0.87.5

2006-09-17 Thread Darren Dale
Hi Don,

On Sunday 17 September 2006 7:06 pm, Don Peterson wrote:
> For my Windows XP machine, I downloaded enthon-python2.4-1.0.0.exe and
> matplotlib-0.87.5.win32-py2.4.exe.  I installed python first (it's version
> 2.4.3) via the Enthought executable; it installed fine with no errors. 
> Then matplotlib installed fine with no errors.
>
>  I installed the matplotlib_examples_0.87.1.zip examples and tried to run
> the barchart_demo.py script; here's the error message I got:
>
>  RuntimeError: module compiled against version 102 of C-API but this
> version of numpy is 90907
>
>  The import of the numpy version of the nxutils module,
>  _nsnxutils, failed.  This is is either because numpy was
>  unavailable when matplotlib was compiled, because a dependency of
>  _nsnxutils could not be satisfied, or because the build flag for
>  this module was turned off in setup.py.  If it appears that
>  _nsnxutils was not built, make sure you have a working copy of
>  numpy and then re-install matplotlib. Otherwise, the following
>  traceback gives more details:
>
>  Traceback (most recent call last):
>File "barchart_demo.py", line 3, in ?
>  from pylab import *
>File "C:\bin\PYTHON~1\Lib\site-packages\pylab.py", line 1, in ?
>  from matplotlib.pylab import *
>File "C:\bin\PYTHON~1\Lib\site-packages\matplotlib\pylab.py", line 198,
> in ? import mlab  #so I can override hist, psd, etc...
>File "C:\bin\PYTHON~1\Lib\site-packages\matplotlib\mlab.py", line 64, in
> ? import nxutils
>File "C:\bin\PYTHON~1\Lib\site-packages\matplotlib\nxutils.py", line 17,
> in ? from matplotlib._ns_nxutils import *
>  ImportError: numpy.core.multiarray failed to import
>
>  The following shows I can import numpy OK:
>
>  --> python
>  Python 2.4.3 - Enthought Edition 1.0.0 (#69, Aug  2 2006, 12:09:59) [MSC
> v.1310 32 bit (Intel)] on win32
>  Type "help", "copyright", "credits" or "license" for more information.
>
>  >>> from numpy import *
>
>  I would very much like to be able to use matplotlib, as it looks much
> better suited to my needs than gnuplot.  Any ideas on how to address this
> problem?

Enthought includes matplotlib, so you dont need to install it seperately. The 
reason for the problem is that your enthought executable includes an older 
version of numpy and matplotlib. The newest matplotlib is compatible with 
numpy1-0b5 and later.

Darren

PS- Please turn off HTML formatting when posting to lists like these

-
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
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users