-
Notifications
You must be signed in to change notification settings - Fork 239
Closed
Labels
enhancementImproving an existing featureImproving an existing feature
Milestone
Description
Description of the problem
When I use the pygmt.Figure.plot command to draw a filled shaded region with a rectangle, I find that regardless of whether I set the transparency to 80 or 100, the effect is always opaque. Transparency doesn't seem to work. (I've output files in both PNG and PDF formats).
test.pdf

My PyGMT version is 0.10.0.
Minimal Complete Verifiable Example
fig = pygmt.Figure()
fig.basemap(region=[-3,4,10,20],
projection="X5i/5i",
frame=['xa1f0.5+l"Time (s)"', 'ya1f0.5+l"Distance (\260)"', "WSen"])
region_data = [[-1,10],[1,10],[1,20],[-1,20]]
fig.plot(data=region_data, fill='#66BFBF', transparency=90, close=True)
fig.savefig('test.pdf')
fig.savefig('test.png')Full error message
The transparency in `pygmt.Figure.plot` command doesn't work.System information
PyGMT information:
version: v0.10.0
System information:
python: 3.9.15 | packaged by conda-forge | (main, Nov 22 2022, 15:55:03) [GCC 10.4.0]
executable: /home/tianyu/anaconda3/envs/pygmt/bin/python
machine: Linux-5.15.0-105-generic-x86_64-with-glibc2.31
Dependency information:
numpy: 1.23.5
pandas: 1.5.2
xarray: 2022.11.0
netCDF4: 1.6.2
packaging: 21.3
contextily: None
geopandas: None
IPython: None
rioxarray: None
ghostscript: 10.03.0
GMT library information:
binary version: 6.4.0
cores: 6
grid layout: rows
image layout:
library path: /home/*/anaconda3/envs/pygmt/lib/libgmt.so
padding: 2
plugin dir: /home/*/anaconda3/envs/pygmt/lib/gmt/plugins
share dir: /home/*/anaconda3/envs/pygmt/share/gmt
version: 6.4.0Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
enhancementImproving an existing featureImproving an existing feature