@@ -549,8 +549,10 @@ def plot_RGB_colourspace_section(
549
549
axis : Literal ["+z" , "+x" , "+y" ] | str = "+z" ,
550
550
origin : float = 0.5 ,
551
551
normalise : bool = True ,
552
+ size : float = 1.0 ,
552
553
show_section_colours : bool = True ,
553
554
show_section_contour : bool = True ,
555
+ segments : int = 64 ,
554
556
** kwargs : Any ,
555
557
) -> Tuple [Figure , Axes ]:
556
558
"""
@@ -571,10 +573,15 @@ def plot_RGB_colourspace_section(
571
573
Coordinate along ``axis`` at which to plot the hull section.
572
574
normalise
573
575
Whether to normalise ``axis`` to the extent of the hull along it.
576
+ size:
577
+ Size of the underlying *RGB* colourspace cube; used for plotting HDR
578
+ related sections.
574
579
show_section_colours
575
580
Whether to show the hull section colours.
576
581
show_section_contour
577
582
Whether to show the hull section contour.
583
+ segments
584
+ Edge segments count for the *RGB* colourspace cube.
578
585
579
586
Other Parameters
580
587
----------------
@@ -617,8 +624,8 @@ def plot_RGB_colourspace_section(
617
624
first_item (filter_RGB_colourspaces (colourspace ).values ()),
618
625
)
619
626
620
- vertices , faces , _outline = primitive_cube (1 , 1 , 1 , 64 , 64 , 64 )
621
- XYZ_vertices = RGB_to_XYZ (vertices ["position" ] + 0.5 , colourspace )
627
+ vertices , faces , _outline = primitive_cube (1 , 1 , 1 , segments , segments , segments )
628
+ XYZ_vertices = RGB_to_XYZ (( vertices ["position" ] + 0.5 ) * size , colourspace )
622
629
hull = Trimesh (XYZ_vertices , faces , process = False )
623
630
624
631
if show_section_colours :
0 commit comments