Übersicht: Python & Blender



No presentation without diagrams. In the scientific field is the presentation of calculation and research results extremely important. Whether at meetings or in publications, they are always required.

How to create bar chart with a few lines of Python code, is here only hinted at.


  1. Imporve the source code.
  2. Set the camera to an appropriate position for rendering.
  3. Optimize the lighting and set the background.
  4. Label the columns.

The Script

The result is minimalist, camera, lighting and background are missing. There is enough evidence in the course material on all these issues. Important here is the adjustment / movement of the Origin i.e. the object center. Why this is useful, you can find out if you comment out the highlighted lines.

use-cases/presentation/bar-diagram.py (Source)

        bpy.context.scene.cursor_location = (i * 3 , 0, -1)

Some output variants as example:


The classical bar chart...


The same values, but ...


A small accident has led to this interesting variant.