- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Report Inappropriate Content
Using a script to plot multiple columns
Hi Everyone,
I have a data table with several columns. The first column in my x-axis, and the rest of the columns are my y-values. I have done this before, but all the column names were numbers, or didn't have any spaces. Now they do, and my code is not working. How can I edit this code to get my plot?
y_cols = dtIdleak << get column names(string,character);
Remove From(y_cols,1);
dtIdleak << Overlay Plot(X(:Vd_V),Y(:(Eval(y_cols))),
Overlay Axis << {{Min( 0.01 ), Max( 100 ), Inc( 1 ), Minor Ticks( 1 )}},
Connect Points(1),
SendToReport(
Dispatch(
{},
"102",
ScaleBox,
{Scale("Log"),Min( 0.01 ), Max( 1000 ), Inc( 1 ), Minor Ticks( 1 )}
),
Dispatch( {}, "", AxisBox, {Add Axis Label( "Idleak (uA)" )} ),
Dispatch( {}, "Y", TextEditBox, {Set Text( "Idleak (uA)" )} ),
Dispatch( {}, "Overlay Plot Graph", FrameBox, {Frame Size( 740, 585 )} )
)
)
Accepted Solutions
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Report Inappropriate Content
Re: Using a script to plot multiple columns
Ok, the names should not matter if you use <<get column names() without the "string" option.
And Change Y(:(Eval(y_cols))) into Y(Eval(y_cols))
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Report Inappropriate Content
Re: Using a script to plot multiple columns
Overlay plot require numeric Y's.
Try <<get column names(numeric);
instead of <<get column names(string,character);
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Report Inappropriate Content
Re: Using a script to plot multiple columns
Unfortunately, that did not work.
The first column (the x values) is labeled "Vd_V", and then the subsequent columns (the y values) have a name like "x= 1 y= 1 Site 1".
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Report Inappropriate Content
Re: Using a script to plot multiple columns
Ok, the names should not matter if you use <<get column names() without the "string" option.
And Change Y(:(Eval(y_cols))) into Y(Eval(y_cols))
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Report Inappropriate Content
Re: Using a script to plot multiple columns
Thank you so much!