[matplotlib-devel] Bug in Agg-based backends when yscale == "log"?

2009-01-26 Thread Jan Müller
Hi,

The simple code snippet at the end of this mail should plot a single line. 

Unfortunately, depending on 
- the backend
- the windowsize
- and the pan/zoom position inside the plot 
one or more additional lines appear.

Under windows it looks like this:

http://img217.imageshack.us/my.php?image=matplotlibproblemei6.png
(disable Adblock Plus on Firefox, otherwise the image might not be visible)

When I pan the plot, the additional lines jump around randomly and sometimes 
dis- and reappear at their own will.


I get this problem for all the AGG-based backends (one additional line) and the 
GTK backend (several additional lines). GTKCairo does not show this behavior.

The problem appears under an up-to-date Fedora 64-bit with matplotlib 0.98.3 
and 0.89.6 SVN (from today)

The output of  "python setup.py" is this:
--
BUILDING MATPLOTLIB
matplotlib: 0.98.6svn
python: 2.5.2 (r252:60911, Sep 30 2008, 15:42:03)  [GCC 4.3.2 20080917 (Red Hat 
4.3.2-4)]
platform: linux2

REQUIRED DEPENDENCIES
numpy: 1.2.0
freetype2: 9.18.3

OPTIONAL BACKEND DEPENDENCIES
libpng: 1.2.33
Tkinter: no
wxPython: 2.8.9.1
  * WxAgg extension not required for wxPython >= 2.8
Gtk+: gtk+: 2.14.5, glib: 2.18.3, pygtk: 2.13.0,
  pygobject: 2.15.4
Qt4: Qt: 4.4.3, PyQt4: 4.4.4
Cairo: 1.4.12

OPTIONAL DATE/TIMEZONE DEPENDENCIES
datetime: present, version unknown
dateutil: 1.4
pytz: 2008i

OPTIONAL USETEX DEPENDENCIES
dvipng: no
ghostscript: 8.63
latex: no
--

Additionally I see this problem under 32-bit Windows XP using the Enthought EPD 
Py25 v4.1.30101 distribution which uses matplotlib 0.98.3

To reproduce the error:
- switch to GTKAgg
- run the script below
- enlarge or maximize the window (something larger than 1280*1024 should be 
fine)
- play around with zoom/pan

Expected result:
- a single line is plotted

Actually result:
- two or more lines are plotted




If you need more information just contact me,
Jan



-



import numpy as np
import matplotlib.pyplot as plt

E = np.array((  
1.e+00,   1.5000e+00,   2.e+00,   3.e+00,
4.e+00,   5.e+00,   6.e+00,   8.e+00,
1.e+01,   1.5000e+01,   2.e+01,   3.e+01,
4.e+01,   5.e+01,   6.e+01,   8.e+01,
1.e+02,   1.5000e+02,   2.e+02,   3.e+02,

4.e+02,   5.e+02,   6.e+02,   8.e+02,
1.e+03,   1.0220e+03,   1.2500e+03,   1.5000e+03,
2.e+03,   2.0440e+03,   3.e+03,   4.e+03,
5.e+03,   6.e+03,   7.e+03,   8.e+03,
9.e+03,   1.e+04,   1.1000e+04,   1.2000e+04,

1.3000e+04,   1.4000e+04,   1.5000e+04,   1.6000e+04,
1.8000e+04,   2.e+04,   2.2000e+04,   2.4000e+04,
2.6000e+04,   2.8000e+04,   3.e+04,   4.e+04,
5.e+04,   6.e+04,   8.e+04,   1.e+05,
1.5000e+05,   2.e+05,   3.e+05,   4.e+05,

5.e+05,   6.e+05,   8.e+05,   1.e+06,
1.5000e+06,   2.e+06,   3.e+06,   4.e+06,
5.e+06,   6.e+06,   8.e+06,   1.e+07,
1.5000e+07,   2.e+07,   3.e+07,   4.e+07,
5.e+07,   6.e+07,   8.e+07,   1.e+08))
   
att = np.array((
6.81740051e+00,   1.75185086e+00,   6.63815247e-01,   1.67656668e-01,
6.29160626e-02,   2.93190047e-02,   1.56961535e-02,   5.86499592e-03,
2.72337524e-03,   6.73972636e-04,   2.49871770e-04,   6.16613263e-05,
2.28421754e-05,   1.05816094e-05,   5.64930077e-06,   2.10496950e-06,
9.82279267e-07,   2.49513274e-07,   9.62561983e-08,   2.63733618e-08,

1.11014287e-08,   5.93131769e-09,   3.67936480e-09,   1.86298464e-09,
1.17168470e-09,   1.12328773e-09,   7.79131487e-10,   5.81480647e-10,
3.70505702e-10,   3.58735080e-10,   2.10556699e-10,   1.46027404e-10,
1.11492282e-10,   9.01020155e-11,   7.55231748e-11,   6.50072897e-11,
5.70367268e-11,   5.08048699e-11,   4.57978746e-11,   4.16871195e-11,

3.82455571e-11,   3.53357639e-11,   3.28322663e-11,   3.06573900e-11,
2.70724292e-11,   2.42403101e-11,   2.19399603e-11,   2.00399310e-11,
1.84446235e-11,   1.70823384e-11,   1.59052762e-11,   1.18363457e-11,
9.42247205e-12,   7.82716448e-12,   5.84766861e-12,   4.66702151e-12,
3.10158861e-12,   2.32245712e-12,   1.54571561e-12,   1.15853984e-12,

9.26114881e-13,   7.71364072e-13,   5.78493179e-13,   4.62698944e-13,
3.08366381e-13,   2.31229973e-13,   1.54153316e-13,   1.1237e-13,
9.24919894e-14,   7.70766578e-14,   5.77835936e-14,   4.62280699e-14,
3.08187133e-14,   2.31110475e-14,   1.54093566e-14,   1.1555

[matplotlib-devel] Request: make plotting of a single point more convenient

2009-07-24 Thread Jan Müller
basically this works:

plot([1], [1], "*")

but I think it would be more convenient to add some kind of auto casting to the 
function in order to make this

plot(1, 1, "*")

work.

I use those single-point-plotting-commands a lot in order to highlight a 
special point in a series of data, but I forget the [] all the time.

Besides being much more convenient (at least for me) this behavior would also 
be much closer to the matlab version, since this works there without any 
problems.

Any ideas/comments/criticism on this?

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