- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Report Inappropriate Content
How do I combine 2 graphs into 1 PNG?
I have these two graphs that I'm saving as seperatly as PNG, but would like to save both graphs as one image. Is that possible?
I'm using version 18.0.1.
gb1 = Graph Builder(
Size(879, 689),
Show Control Panel(0),
Grid Color("Black"),
Variables(X(:SiteX), Y(:SiteY), Wrap(:Wafer), Color(:BDO_P1P2)),
Elements(Heatmap(X, Y, Legend(44), Label("Label by Value"))),
Local Data Filter(Close Outline(1)),
SendToReport(
Dispatch({}, "SiteX", ScaleBox, {Label Row(Show Major Grid(1))}),
Dispatch({}, "SiteY", ScaleBox, {Label Row(Show Major Grid(1))}),
Dispatch({}, "400", ScaleBox,
{Legend Model(
44,
Properties(-1, {Fill Color(32)}, Item ID("01", 1)),
Properties(-1, {Fill Color(32)}, Item ID("02", 1)),
Properties(-1, {Fill Color(32)}, Item ID("03", 1)),
Properties(-1, {Fill Color(32)}, Item ID("04", 1)),
Properties(-1, {Fill Color(32)}, Item ID("05", 1)),
Properties(-1, {Fill Color(32)}, Item ID("06", 1)),
Properties(-1, {Fill Color(32)}, Item ID("07", 1)),
Properties(-1, {Fill Color(32)}, Item ID("08", 1)),
Properties(-1, {Fill Color(32)}, Item ID("09", 1)),
Properties(-1, {Fill Color(32)}, Item ID("10", 1)),
Properties(-1, {Fill Color(32)}, Item ID("11", 1)),
Properties(-1, {Fill Color(32)}, Item ID("12", 1)),
Properties(-1, {Fill Color(32)}, Item ID("13", 1)),
Properties(-1, {Fill Color(32)}, Item ID("14", 1)),
Properties(-1, {Fill Color(32)}, Item ID("15", 1)),
Properties(-1, {Fill Color(32)}, Item ID("16", 1))
)}
),
Dispatch({}, "graph title", TextEditBox, {Set Text("Notch up")}),
Dispatch({}, "X title", TextEditBox, {Set Text("X position")}),
Dispatch({}, "Y title", TextEditBox, {Set Text("Y position")}),
Dispatch({}, "Graph Builder", FrameBox,
{DispatchSeg(RectSeg(1), {Line Width(1), Line Width(1)})}
),
Dispatch({}, "Graph Builder", FrameBox(2),
{DispatchSeg(RectSeg(1), {Line Width(1), Line Width(1)})}
),
Dispatch({}, "Graph Builder", FrameBox(3),
{DispatchSeg(RectSeg(1), {Line Width(1), Line Width(1)})}
),
Dispatch({}, "Graph Builder", FrameBox(4),
{DispatchSeg(RectSeg(1), {Line Width(1), Line Width(1)})}
),
Dispatch({}, "Graph Builder", FrameBox(5),
{DispatchSeg(RectSeg(1), {Line Width(1), Line Width(1)})}
),
Dispatch({}, "400", LegendBox, {Set Title("Value")})
),
Invisible
);
filePath = subDir1 || "\BDO_P1P2.png";
gb1 << Save Picture(filePath, "png");
gb2 = Graph Builder(
Size(858, 639),
Show Control Panel(0),
Show Legend(0),
Variables(X(:Wafer), Y(:BDO_P1P2)),
Elements(Points(X, Y, Legend(43))),
SendToReport(
Dispatch({}, "Wafer", ScaleBox, {Label Row(Show Major Grid(1))}),
Dispatch({}, "BDO_P1P2", ScaleBox,
{Min(10), Max(60), Inc(5), Minor Ticks(0),
Add Ref Line(39, "Dashed", "Blue", "Spec Upper Limit", 1),
Add Ref Line(26, "Dashed", "Blue", "Spec Lower Limit", 1),
Add Ref Line(30.9, "Dashed", "Green", "Spec Target", 1),
Label Row(Show Major Grid(1))}
),
Dispatch({}, "graph title", TextEditBox, {Set Text("")})
),
Invisible
);
filePath = subDir1 || "\BDO_P1P2_Trend.png";
gb2 << Save Picture(filePath, "png");
1 ACCEPTED SOLUTION
Accepted Solutions
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Report Inappropriate Content
Re: How do I combine 2 graphs into 1 PNG?
Created:
Jan 6, 2025 01:00 PM
| Last Modified: Jan 6, 2025 10:10 AM
(407 views)
| Posted in reply to message from CoxPorcupine721 01-06-2025
Combine the graphs into same report window (Window / Combine Windows or create a dashboard or script it). Below is simple scripted example
Names Default To Here(1);
filepath = "$TEMP/myreport.png";
dt = open("$SAMPLE_DATA/Big Class.jmp");
nw = New Window("Two windows",
V List Box( // Or H List Box
gb1 = dt << Graph Builder(
Show Control Panel(0),
Variables(X(:weight), Y(:height), Overlay(:sex)),
Elements(Points(X, Y, Legend(9)), Line Of Fit(X, Y, Legend(11)))
),
gb2 = dt << Graph Builder(
Show Control Panel(0),
Variables(X(:weight), Y(:age), Overlay(:sex)),
Elements(Points(X, Y, Legend(9)), Line Of Fit(X, Y, Legend(11)))
)
)
);
nw << Save Picture(filepath, "png");
wait(0);
nw << close window;
Web(filepath); // Open image in default program
Edit: View menu to Window menu for Combine Windows
-Jarmo
1 REPLY 1
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Report Inappropriate Content
Re: How do I combine 2 graphs into 1 PNG?
Created:
Jan 6, 2025 01:00 PM
| Last Modified: Jan 6, 2025 10:10 AM
(408 views)
| Posted in reply to message from CoxPorcupine721 01-06-2025
Combine the graphs into same report window (Window / Combine Windows or create a dashboard or script it). Below is simple scripted example
Names Default To Here(1);
filepath = "$TEMP/myreport.png";
dt = open("$SAMPLE_DATA/Big Class.jmp");
nw = New Window("Two windows",
V List Box( // Or H List Box
gb1 = dt << Graph Builder(
Show Control Panel(0),
Variables(X(:weight), Y(:height), Overlay(:sex)),
Elements(Points(X, Y, Legend(9)), Line Of Fit(X, Y, Legend(11)))
),
gb2 = dt << Graph Builder(
Show Control Panel(0),
Variables(X(:weight), Y(:age), Overlay(:sex)),
Elements(Points(X, Y, Legend(9)), Line Of Fit(X, Y, Legend(11)))
)
)
);
nw << Save Picture(filepath, "png");
wait(0);
nw << close window;
Web(filepath); // Open image in default program
Edit: View menu to Window menu for Combine Windows
-Jarmo