Reducing the size of pdf figure file in matplotlib

前端 未结 2 925
猫巷女王i
猫巷女王i 2020-12-31 16:40

In matplotlib, I am using LineCollection to draw and color the countries, where the boundaries of the counties are given. When I am saving the figu

2条回答
  •  南方客
    南方客 (楼主)
    2020-12-31 17:23

    I think using "rasterized = True" effectively saves the image similarly to png format. When you zoom in, you will see blurring pixels.

    If you want the figures to be high quality, my suggestion is to sample from the data and make a plot. The pdf file size is roughly the amount of data points it need to remember.

提交回复
热议问题