-
Notifications
You must be signed in to change notification settings - Fork 229
Description
Description of the problem
We need to update the documentation for the transparency
parameter in plot and plot3d because transparency
can also be 1d array
.
See the description of the transparency
parameter of plot:
transparency (int or float) – Set transparency level, in [0-100] percent range. Default is 0, i.e., opaque. Only visible when PDF or raster format output is selected. Only the PNG format selection adds a transparency layer in the image (for further processing). transparency can also be a 1d array to set varying transparency for symbols.
See the description of the transparency
parameter of plot3d:
transparency (int or float) – Set transparency level, in [0-100] percent range. Default is 0, i.e., opaque. Only visible when PDF or raster format output is selected. Only the PNG format selection adds a transparency layer in the image (for further processing). transparency can also be a 1d array to set varying transparency for symbols.
We can see that transparency
can be 1d array at the end of the above description, but it is missing at the beginning. See the example of Points with varying transparency using a 1d array as transparency
.
Meanwhile, array-like transparency
doesn't work for the data
parameter. It is only valid for x
/y
like the sizes
parameter. (originally posted in #1065 (comment)).
A GMTInvalidInput
is raised for an array-like transparency
when the data
parameter is used in #1065. We may add a test for this kind of invalid input. A test called test_plot_fail_color_size_intensity
is updated in #1065 for 1d-array color
, sizes
, and intensity
when data
parameter is used. It should be easy to add transparency
in this test function, which may have a more general name, e.g.,test_plot_fail_1d_array_with_data