CDAT/uvcmetrics

pdf plot in diags needs some attention

Opened this issue · 6 comments

We are trying to use the .pdf format and the labels are shifted slightly. Could somebody look at these?. Is this a VTK issue?

see attached
set5_ANN_CLDHGH_ISCCP_Global-combined.pdf
set5_ANN_CLDHGH_ISCCP_Global-diff.pdf

Has anybody looked at this?

@aashish24 @doutriaux1 @chaosphere2112 , even the pdf files look bad enlarged. The coastlines look bad enlarged. This is something new. I thought .pdf files were vector drawn. Can we put out .ps also?

@dlonie any chance you can take a quick look at this?

I'm suspicious of this bit:

https://github.com/UV-CDAT/uvcdat/blob/master/Packages/vcs/vcs/VTKPlots.py#L1110-L1113

If the Write3DPropsAsRasterImage option is enabled on the vtkGL2PSWriter, this will cause all of the geometry to be exported as a raster image, rather than vector graphics. It is required for textures due to limitations of GL2PS, but at the cost of forcing everything beside text and a handful of other special props to be rasterized.

You can try using raster exclusions: http://www.vtk.org/doc/nightly/html/classvtkGL2PSExporter.html#a6428bc4594032b5a3af7e8595effe3a5 That will whitelist certain 3D props to be output as vectors when Write3dPropsAsRasterImage is enabled, but there are likely to be depth artifacts, since any rasterized geometry will always appear behind the vector geometry.

BTW, on the OpenGL2 backend, this option is ignored and everything besides text/charts will always be rasterized. This could be worked-around by patching VTK's polydata rendering engine, but the change would be non-trivial. This is due to GL2PS relying on deprecated OpenGL functionality that is no longer available in the new backend.

thanks @dlonie, I am trying to disable the "Write3DPropsAsRasterImage" option for now. For the long run
we can try the approach we discussed other day (use a filter to extract the outlines of the geometry).