Model.setlegendbackgroundcolor#

Model.setlegendbackgroundcolor(red, green, blue, alpha)#

Sets the legend background color. This applies to all HyperMesh legends.

Parameters:
  • red (double) – The red color value, from 0.0 to 1.0.

  • green (double) – The green color value, from 0.0 to 1.0.

  • blue (double) – The blue color value, from 0.0 to 1.0.

  • alpha (double) – The alpha transparency value, from 0.0 to 1.0.

Examples#

Set the legend background color to red with no transparency#
import hm
import hm.entities as ent

model = hm.Model()

model.setlegendbackgroundcolor(red=1.0, green=0.0, blue=0.0, alpha=1.0)
Set legend background color to gray with some transparency#
import hm
import hm.entities as ent

model = hm.Model()

model.setlegendbackgroundcolor(red=0.5, green=0.5, blue=0.5, alpha=0.5)