help-octave
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Publishing with Octave


From: Kai Torben Ohlhus
Subject: Re: Publishing with Octave
Date: Mon, 11 Feb 2019 16:27:01 +0100

On Mon, Feb 11, 2019 at 10:40 AM proxima434 <address@hidden> wrote:
Hi Kai,

thanks a lot for your help !

My target is to create a condition monitoring report.

The company I work for produces machines for foilproduction and I´d like to
create a html-report

including the most important diagrams.

So for eg.: I get the data from one customer than run the script and get my
report.

After that I can load the data of a different customer, run the script and
again get my report with the

most important diagrams like time vs. speed or time vs. torque...

I use more of the publishing markup in the real script. I also thought about
using the print command but

I don´t know how to include the created pngs in the html.

So basically I need a way to publish the script including all the plots not
only the last one opened.


regards,
Alex


Alright, I think to understand the situation better now.  First, if you are using Octave 4.4.1, I suggest to replace the publish.m file by the latest version [1], which will run in 4.4.1 perfectly.
You find the current location of publish by typing "which publish" and then replace that file with [1].  I overhauled that file recently and works more reliable now.

Then you have to modify the script to be publish, such that the following conditions are met:

1) All relevant actions for a particular plot have to happen within a single code cell.  They may not be split by text sections "%%"
2) If you generate multiple plots within a single code cell (for example by a loop), make sure, that in a script all of those plots are kept open.  Use figure() to create a new plot window.
3) You should not call publish at the end of the script.  There is a danger of recursive calls.

I hope to present a minimal example with the attached file pub_tst.m.  Note that is is also allowed to call other scripts or functions from each code cell, so don't be too focused on just a single script to publish.  Call proper subroutines or functions to help you with the export.

Best,
Kai

[1] https://hg.savannah.gnu.org/hgweb/octave/raw-file/7b9a5ab8350f/scripts/miscellaneous/publish.m 

Attachment: pub_tst.m
Description: Text Data


reply via email to

[Prev in Thread] Current Thread [Next in Thread]