Dear list fellows,
I am writing an app focused in structural geology, using wxpython and
matplotlib. To be quite honest, I'm not sure if this question should
go here or in the wxpython list (so to avoid cross-posting, I'll try
The app uses matplotlib to plot data from orientation data as points
or lines (circles) in a stereonet (a circular plot using Lambert's
equal-area projection). So far, it is in it very early stages, I have
two panels (one for data display and the other for the plot itself), I
can open CSV files and I can even plot them! I must say I am surprised
to have achieved all this in about two week of work, with nearly no
experience in python (just some small scripts), and no experience at
all with wxpython/matplotilib.
My problem now is that I can plot the data in three different ways,
and the plots are overlaid on to the last one (I still don't know if
this kind of behaviour should be removed or not), but the thing is,
that depending on the order in which I plot the data, the graphic
changes its position in the window!
Just a brief explanation of the interface first: The option are in the
toolbar, the first button opens a data file, the second one creates
the stereonet, the third and fourfh plot data as points and the fifth
plot as lines.
Try this with the attached code: open the data (1st btn), create the
plot (2nd btn), then plot the data as points (3rd and 4th btns) and
then as lines (5th btn). OK, now clean the plot (2nd btn) and plot
first as lines (5th btn) and then as points (3rd or 4th btns), and you
will see that the plot moves to the left! At least for me (Ubuntu
If you could give me any advice on why this is happening (and how to
prevent it), I will be very thankful.
PS. I know my code is not as good as it could. I'm new to
OO-programing, so I still need to understand properly how to work with
classes, etc, and I promisse I will improve the code in the near
future! (any advices here are also welcome!)
Many thanks for your help
data.txt (255 Bytes)
pystereo16.py (8.78 KB)
Carlos Henrique Grohmann - Geologist D.Sc.
a.k.a. Guano - Linux User #89721
carlos dot grohmann at gmail dot com
"Good morning, doctors. I have taken the liberty of removing Windows
95 from my hard drive."
--The winning entry in a "What were HAL's first words" contest judged
by 2001: A SPACE ODYSSEY creator Arthur C. Clarke
Can’t stop the signal.