Other functions#
- contourpy.convert_filled(filled, fill_type_from, fill_type_to)[source]#
Return the specified filled contours converted to a different
FillType.- Parameters:
- Returns:
Converted filled contour polygons.
When converting non-chunked fill types (
FillType.OuterCodeorFillType.OuterOffset) to chunked ones, all polygons are placed in the first chunk. When converting in the other direction, all chunk information is discarded. Converting a fill type that is not aware of the relationship between outer boundaries and contained holes (FillType.ChunkCombinedCodeor)FillType.ChunkCombinedOffset) to one that is will raise aValueError.New in version 1.2.0.
- contourpy.convert_lines(lines, line_type_from, line_type_to)[source]#
Return the specified contour lines converted to a different
LineType.- Parameters:
- Returns:
Converted contour lines.
When converting non-chunked line types (
LineType.SeparateorLineType.SeparateCode) to chunked ones (LineType.ChunkCombinedCode,LineType.ChunkCombinedOffsetorLineType.ChunkCombinedNan), all lines are placed in the first chunk. When converting in the other direction, all chunk information is discarded.New in version 1.2.0.
- contourpy.dechunk_filled(filled, fill_type)[source]#
Return the specified filled contours with all chunked data moved into the first chunk.
Filled contours that are not chunked (
FillType.OuterCodeandFillType.OuterOffset) and those that are but only contain a single chunk are returned unmodified. Individual polygons are unchanged, they are not geometrically combined.- Parameters:
- Returns:
Filled contours in a single chunk.
New in version 1.2.0.
- contourpy.dechunk_lines(lines, line_type)[source]#
Return the specified contour lines with all chunked data moved into the first chunk.
Contour lines that are not chunked (
LineType.SeparateandLineType.SeparateCode) and those that are but only contain a single chunk are returned unmodified. Individual lines are unchanged, they are not geometrically combined.- Parameters:
- Returns:
Contour lines in a single chunk.
New in version 1.2.0.
- contourpy.max_threads() int#
Return the maximum number of threads, obtained from
std::thread::hardware_concurrency().This is the number of threads used by a multithreaded ContourGenerator if the kwarg
threads=0is passed tocontour_generator().