Next: , Previous: Plots, Up: Top


4 Some tricks

If you are working with QtOctave, there are some tricks very useful.

  1. To show your SVG files in QtOctave, you can use svgcanvasload command:
              svgcanvasload(1, 'file.svg');
    

    Number is number of window, you can open several SvgCanvas. 'file.svg' is SVG file to show. You can use svgcanvas_delete_on_load to plot. It deletes file when it finish to draw.

  2. To export to png, png, ... You can use svgcanvassave:
              svgcanvassave(1, 800, 600, 'file.png');
    

    svgcanvassave (N, WIDTH, HEIGHT, FILE) Saves plot in window N in FILE. FILE can be a PDF, PNG, JPEG, PS,... file format.

  3. Making videos with ffmpeg. ffmpeg is a powerfull, but "commad line", tool to process videos. ffmpeg can build videos from images in JPEG file format.

    Remember!! Videos has got 24 pictures per second. Then 24 pictures are one second of video.

    First, export and rename your pictures to follow a numerical sequence. For example, img1.jpg, img2.jpg, img3.jpg,... Then you may run:

                ffmpeg -f image2 -i img%d.jpg video.mpg
    

    Notice that '%d' is replaced by the image number.

    'img%03d.jpg' means the sequence 'img001.jpg', 'img002.jpg', etc...