The Siemens Community Catalyst program was co-created with our community to acknowledge technology leaders who consistently contribute to the Siemens Community. Nominations are accepted on a rolling basis.
Is it possible save the Compose plot result into pdf file? (Compose Ver. 2017.3)
- Save the plots into a PDF
we don’t support creating of PDF and PPTX from COMPOSE OML in 2017.3, these features are coming up in next releases. We can leverage COMPOSE – Python (2way bridge) to accomplish this task.
below are the steps with example:
for i =1:10
f=figure(i);
plot(rand(1,100));
saveas(f, ['demo',num2str(i),'.png']);
end
outfile = 'mypdf.pdf';
exporttopython('outfile','outfile');
evalpythonfile('python_pdf.py'); % comments are added in the file for better understanding.
Hope this helps.
<?xml version="1.0" encoding="UTF-8"?>
Unable to find an attachment - read this blog
Thank you, Manoj
I tried to change picture format wit 'bmp'.
So I changed 'png' to 'bmp' in both oml file and py file.
But it makes error.
I want better resolution rather then png.
Can you help me about this? ; use 'bmp' picture format.
Hi Seoksan,
The fpdf python library support jpg, png but not bmp. we can use 'pillow' library to save .bmp to pdf
below is the sample example script that can save the .bmp files in a pdf
Join us for a community conversation on how High-Performance Computing (HPC) and Simcenter PSIM work together to meet the increasing demands of modern power electronics simulation. During this one-hour technical session, you'll discover how leveraging HPC can speed up simulations, improve scalability, and empower engineers…
Join us for a community conversation on accelerating your motor simulation workflow with Simcenter Simlab. In this beginner-friendly session, we'll introduce the platform's automated model-building capabilities and show how easy it is to set up your first electric motor analysis. You'll see the basic steps of geometry…
Join us for a Community Conversation where we'll discuss practical approaches to analyzing complex electromagnetic models using hybrid solver techniques. This session will provide a general overview of how different computational methods can be combined within a single simulation to address models containing varied…