Page 1 of 1

Multiple Charts

Posted: Thu Nov 12, 2009 4:18 pm
by jjcamilli
I have a CSV file with 8 columns in it. Column “A” is time and date will be the “X” axis. The rest of the columns are performance data for Perfmon. I want to automate the creation of the 7 charts one for each column in the spreadsheet.

Posted: Thu Nov 12, 2009 4:52 pm
by DPlotAdmin
With your file already open in DPlot (7 curves), you can do this with a DPlot macro. Select File>Macro, type a name for the macro you'll remember, then click Edit/Create

In the Macro editor window, just type

MoveCurves(0,2,1) ' and repeat 5 times:
MoveCurves(0,2,1)
MoveCurves(0,2,1)
MoveCurves(0,2,1)
MoveCurves(0,2,1)
MoveCurves(0,2,1)

6 moves. After completion the original document will contain only the first curve.

The first 0 says move the curve to a new document. The 2 says move the 2nd curve (the second time you call this function you'll have already moved the 2nd curve and deleted it from the original document, so the previous 3rd curve becomes the 2nd curve). The 1 in the 3rd argument says "move (and delete)" rather than "copy".

Posted: Thu Nov 12, 2009 5:25 pm
by DPlotAdmin
BTW when testing this I noticed a couple of things that didn't seem quite right to me that have been changed here. If moving a curve to an empty document, it makes sense to copy the X axis label and all scaling information (linear/log, number formats, etc.). That isn't done in the version you have but will be in the next release.

Posted: Fri Nov 13, 2009 8:25 am
by jjcamilli
What is the ETA on the update?

Posted: Fri Nov 13, 2009 8:53 am
by DPlotAdmin
Barring any significant bugs, the end of the month.

Posted: Fri Nov 13, 2009 6:25 pm
by DPlotAdmin
Since you seem to be referring to Excel, I thought I'd throw out that you can get similar results with a VBA macro. If your data is in columns A through H starting in row 1, this will do the trick:

Code: Select all

    Range("A:A,B:B").Select
    Call XYXY
    
    Range("A:A,C:C").Select
    Call XYXY

    Range("A:A,D:D").Select
    Call XYXY

    Range("A:A,E:E").Select
    Call XYXY

'    etc.
In the VBA editor window select Tools>References and check "dplotlib".

Posted: Wed Nov 18, 2009 7:44 pm
by DPlotAdmin
Changes to Move/Copy Curves are included with today's update. For licensed users, mailing list mail with download instructions is being sent as I write this, or you can get the update using the "Check for Updates" command on the Help menu.