Multiple Charts
Moderator: DPlotAdmin
Multiple Charts
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.
- DPlotAdmin
- Posts: 2312
- Joined: Tue Jun 24, 2003 9:34 pm
- Location: Vicksburg, Mississippi
- Contact:
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".
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".
Last edited by DPlotAdmin on Fri Nov 13, 2009 8:55 am, edited 1 time in total.
Visualize Your Data
support@dplot.com
support@dplot.com
- DPlotAdmin
- Posts: 2312
- Joined: Tue Jun 24, 2003 9:34 pm
- Location: Vicksburg, Mississippi
- Contact:
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.
Visualize Your Data
support@dplot.com
support@dplot.com
- DPlotAdmin
- Posts: 2312
- Joined: Tue Jun 24, 2003 9:34 pm
- Location: Vicksburg, Mississippi
- Contact:
- DPlotAdmin
- Posts: 2312
- Joined: Tue Jun 24, 2003 9:34 pm
- Location: Vicksburg, Mississippi
- Contact:
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:
In the VBA editor window select Tools>References and check "dplotlib".
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.
Visualize Your Data
support@dplot.com
support@dplot.com
- DPlotAdmin
- Posts: 2312
- Joined: Tue Jun 24, 2003 9:34 pm
- Location: Vicksburg, Mississippi
- Contact:
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.
Visualize Your Data
support@dplot.com
support@dplot.com