Search code examples
modelicaopenmodelica

Resizing images in the Modelica documentation


Consider this scenario. I save a plotted curve using the save option in OMEdit Plotting Window. I want to use this image in the Documentation of the same model as a reference for others. But the issue with this is the images that are saved using this feature are very big and take up a lot of space(i.e. width and height) in the Documentation window.

I tried using the HTML code width = "xx" height = "yy". But this did not work.

Is there any way I can resize the images using HTML code in the OpenModelica Documentation?


Solution

  • Just for information. The size of the exported plot image depends on the size of the plot window. The plot window is a MDI container so you can resize the plot window and then can export a smaller image.

    The following code works fine for me (uses the same Documentation annotation as suggested by Martin),

    model documentation
      annotation(Documentation(info = "<html>
      <img width=\"200\" src=\"modelica://documentation/modeling.png\" />
      <br />
      <img width=\"100\" src=\"modelica://documentation/modeling.png\" />
      </html>"));
    end documentation;
    

    Here is the sample screenshot, enter image description here