2

I create the plot I need in julia, but upon saving with savefig, the vspan fill is printed as black, although it is specified as very light red.

This is what is show in my notebook and I am savign enter image description here but when I save it as pdf, the red blocks become black imposing over the index I want to trackenter image description here Surprisingly, this does not happened when I savefig as png, but I would prefer pdf for the manuscript I am writing.

Thanks for tips how to fix this!

Jan Sila
  • 1,554
  • 3
  • 17
  • 36

2 Answers2

1

The issue is that in pdf, the borders of the vspans are printed quite thick and black while slim in png. I lazily plotted each vspan of width 1 x-axis-tick, so that is what we see. When I specify correctly the vspan intervals [start, end] it is clear

Current setup julia to 1.8.5 and the libraries.

  [7073ff75] IJulia v1.24.0
⌃ [91a5bcdd] Plots v1.6.12

and works correctly straight out of box of course.

Jan Sila
  • 1,554
  • 3
  • 17
  • 36
0

For best color for publishing, you want to save the image as CMYK PDF/X color, but Plots does not do this. You can use the free publishing app Scribus (under Linux, OSX, Widows, etc) to do the conversion to PDF/X CMYK from png or jpg though.

Bill
  • 5,600
  • 15
  • 27
  • Hi, thanks for your response. Do you think it is just an incorrectly printed color? I would expect this would work straight out of the box for Plots or some other backends. I tried `plotlyjs` backend but it messed it up into other colors actually. Strange, I would not expect such issues with something that seems simple. – Jan Sila Mar 24 '23 at 20:47
  • No, it's probably that the default pdf maker does not handle color well. That's why Adobe made PDF/X. – Bill Mar 24 '23 at 20:58