PS: I thought I would probably give a better example
In a directory I have these files: 2537.dat 5043.dat 5075.dat 7581.dat 1.009e+04.dat 1.551e+04.dat 1.805e+04.dat 2.056e+04.dat 4.955e+04.dat 5.209e+04.dat 5.459e+04.dat 5.462e+04.dat 1.445e+05.dat 1.47e+05.dat 5.016e+05.dat 5.041e+05.dat 5.067e+05.dat 5.171e+05.dat 5.196e+05.dat 5.511e+05.dat 5.537e+05.dat 5.562e+05.dat 8.842e+05.dat 1.465e+06.dat I would like to plot them with matplotlib like this: ----------------------------------------------------------- X = cluster[:, 1] # Column 2 Y = cluster[:, 2] # Column 3 M = cluster[:, 4] # Column 5 Radius = log(M) ylabel ('Y (pc)', size=18) scatter(X, Y, s=Radius,\ marker='o', color='red',\ edgecolors='black',\ alpha=0.9,antialiased=True) xlabel ('X (pc)', size=18) ----------------------------------------------------------- where "cluster" runs from the first data file to the last one and "color" changes from one data file to the next one The goal is to have all the data files plotted in a single graph How could I do this? Thanks a lot P. On 3 May 2011 20:37, Pau <vim.u...@googlemail.com> wrote: > Hello, > > I am afraid that I know the answer to the question: use python > > But my problem is that I do not really know python. I just started and > I can do some nice plots with matplotlib but I don't really know > python. > > I am now running into a snag. I have different directories with > different number of data files > > Directory 1 ---> data1.dat data2.dat data3.dat data4.dat data5.dat > Directory 2 ---> data1.dat data2.dat data3.dat > > The number of files is huge, I do not want to run this one by one per hand. > > I am trying to do this with a shell script which actually prepares the > data files but I do not know how to tell matplotlib from the shell > script that the number of files is different and that it should use > different colours for different files. > > I can explain this in much more detail if needed, but I wanted to hear > a first impression. > > thanks, > > Pau > ------------------------------------------------------------------------------ WhatsUp Gold - Download Free Network Management Software The most intuitive, comprehensive, and cost-effective network management toolset available today. Delivers lowest initial acquisition cost and overall TCO of any competing solution. http://p.sf.net/sfu/whatsupgold-sd _______________________________________________ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users