From: Dima K. <gn...@di...> - 2023-06-15 23:10:01
|
Ethan A Merritt <me...@uw...> writes: >> The patches I'm proposing are here: >> >> https://github.com/dkogan/gnuplot/tree/colorbox_smooth > > I do not know how to generate the relevant patches via github. It > says: "master and colorbox_smooth are entirely different commit > histories" Could you please send me the relevant patch series as > generated by "git format-patch"? I'm only two patches out-of-date: dima@shorty:~/projects/gnuplot$ git show-branch HEAD origin/master ! [HEAD] smooth colorbox: render as a bitmap if the terminal supports it ! [origin/master] Do not report terminal type to user until after initialization is complete -- + [HEAD] smooth colorbox: render as a bitmap if the terminal supports it + [HEAD^] no-op cleanup: consolidated next-colorbox-slice logic + [HEAD~2] no-op cleanup: consolidated draw-colorbox-slice logic + [HEAD~3] no-op cleanup: consolidated colorbox bounds logic + [HEAD~4] no-op cleanup: consolidated steps-in-colorbox logic + [origin/master] Do not report terminal type to user until after initialization is complete + [origin/master^] VMS cleanup ++ [HEAD~5] qt: qt4 was apparently weak at int->double promotion I'm attaching the patches to this email. > OK. The other alternative is to make this specific to cairopdf. Unless > you know of other terminals that suffer from the same problem? Actually.... You're right. It's only semi-related to THIS discussion, but let me bring that up. The svg terminal currently produces images with no image-rendering annotations. And most browsers render images with bilinear interpolation by default, which makes low-res images look very wrong. I looked at this a while back, and, there was no browser-independent way to turn that off. And I think there still isn't. I'm attaching an svg of this gnuplot script made WITH the new patches AND by manually adding image-rendering="crisp-edges" to it: set output "/tmp/tst-colorbox-log.svg" set terminal svg set palette maxcolors 5 set logscale cb set cbrange [1:10] plot 5 with points palette If you open that in firefox, it should look good, but if you open it in chrome, it won't. To make it work in chrome, "crisp-edges" needs to become "pixelated". I don't know how to make it work with both. So if we can fix this, I'd say we should do the colorbox-image thing whenever available. But if we can't, maybe limiting it to only cairopdf (or NOT svg) is the answer. Let me ask a web-dev friend about how to make svg work right in all browsers. There's probably a way. The current set of attached patches does NOT limit itself to cairopdf >> I don't see this. I'm looking at >> >> https://gnuplot.sourceforge.net/demo/heatmaps.html > > That is the png version; it doesn't show the effect I'm talking about. > Have a look at the svg version > https://gnuplot.sourceforge.net/demo_svg/heatmaps.html > > In particular the plot with title > Compare "image" and "image pixels" Ah yes. This is exactly what I mentioned above. I don't remember any terminal other than svg having this problem. But I certainly haven't touched all of them. |