將日誌另存為 PNG(或 PDF)我正在嘗試將一個非常基本的表格保存為 PNG(或 PDF)。我可以用我的表創建日記,但無法正確保存它。通過閱讀此留言板並查閱腳本指南,以下內容應該有效,但實際上並沒有保存任何內容。
任何幫助,將不勝感激。
Names default to here(1);
dt = current data table();
path_to_results=Pick Directory("Results folder");
r = Column Dialog(
cats = Col List("Categories", Max Col( 10 ), MinCol( 0 )),
);
cat = r["cats"];
st = Data Table( Eval(TableName) ) <<
Summary(
Group(
:Label1,
Eval(cat)
)
);
jrn = st << Journal;
jrn << SavePDF( path_to_results||"categorychart.pdf");回复:將日誌保存為 PNG(或 PDF)和@SDF1使用儀表板有一個很好的解決方案。
https://community.jmp.com/t5/Discussions/Save-Graph-amp-Datatable-and-output-as-png-file/mp/221844#M44269
回复:將日誌保存為 PNG(或 PDF)對不起,我錯過了數據表位。 在嘗試為其展示框拍照時,數據表不像分析平台。 這是另一種方法,使用日記盒。
dt = Open( "$sample_data/Cereal.jmp" );
journaltext = (Window( dt )) << getjournal;
journalbox = Journal Box( journaltext );
image = journalbox << getpicture;
New Window( "image", image );
pdf = journalbox << savepdf( "$temp/cereal.pdf" );
Open( "$temp/cereal.pdf" );
image capture of tableimage capture of table桌子的圖像捕獲
您可以使用以下方式保存圖像
journalbox << savepicture( "$temp/cereal.png", "png" );
回复:將日誌保存為 PNG(或 PDF)關閉這個。我能夠找到一個解決方案來做我想做的事。
我編寫了一個函數來在新窗口中顯示我的表格,然後將該新窗口保存為 png 文件。
SplitChartCreator = Function({dt,path_to_results},{Default Local},
r = Column Dialog(
split = Col List("Split Columns", Max Col( 10 ), MinCol( 0 )),
);
splits = r["split"];
st = dt <<
Summary(
Group(
:Lot,
:Wafer,
Eval(splits)
)
);
st << Delete Columns ( "N Rows" );
tb = Table Box();
For (i=1,i<=NCols(st),i++,
col = Column(st,i);
colName = col << Get Name;
lstValues = col << Get Values;
type = col << Get Data Type;
If (type=="Character",
tb << Append(
String Col Box(colName,lstValues)
)
,
tb << Append(
Number Col Box(colName,lstValues)
)
);
);
content = H List Box(
Outline Box("splitchart", << Outline Close Orientation("Vertical"),
tb
)
);
pw = New Window("splitchart", content);
img = pw << getpicture();
img << saveImage(path_to_results||"splitchart.png", "png");
Close(st, NoSave);
pw << Close Window();
);回复:將日誌保存為 PNG(或 PDF)是的。@Wendy_Murphrey剛剛發布xpath導航到顯示框樹中的節點的方法,或者您可以使用顯示框下標。 當您到達正確的節點時,將其另存為 PNG。 像這樣使用顯示框下標的東西。
from the top left red triangle in the report, Edit->Show Tree Structurefrom the top left red triangle in the report, Edit->Show Tree Structure從報告左上角的紅色三角形中,編輯->顯示樹結構
使用 show tree structure 命令確定您需要的報告部分。 在這裡,圖片框 (1) 捕獲了整個部分沒有標題的圖形。 然後,像這樣使用 JSL:
dt = Open( "$sample_data/big class.jmp" );
dist = dt << Distribution(
Continuous Distribution( Column( :weight ) ),
Nominal Distribution( Column( :age ) )
);
boxtree = Report( dist );
picbox = boxtree[Picture Box( 1 )];
picbox << savepicture( "$desktop/distrib.png", "png" );
The captured PNG fileThe captured PNG file捕獲的 PNG 文件
當我設置了 picbox 變量時,我不確定拍照的命令是什麼。 我用它來找出該框可用的命令:
showproperties(picbox)
並在列表中找到了這個:
save picture commandsave picture command保存圖片命令
然後您可以在腳本索引中查找:
Help->Scripting IndexHelp->Scripting Index幫助->腳本索引
回复:將日誌保存為 PNG(或 PDF)謝謝。這確實解決了 SavePDF 功能的問題,但可惜這不是我想要的。我真正需要做的是將小桌子保存為圖像,而不是所有額外的東西。關於如何只用表格保存 PNG 有什麼建議嗎?可能類似於在新窗口中創建表格,然後將新窗口的圖像保存為 PNG。
回复:將日誌保存為 PNG(或 PDF)在 JMP 14 中,<
jrn=currentjournal();
然後保存pdf。