fsmosca / Python-Chess-Scripts

Tools to process things using python chess library.
GNU General Public License v3.0
1 stars 1 forks source link

The bugfix for setting width/height introduced some problems #3

Open rwbc opened 3 years ago

rwbc commented 3 years ago

Now as the options work for setting the width/height in the graphs, there needs to be some auto-scaling of the fonts, I guess. I did adapt the fonts manually for a new size (4:2.7 - I tried to keep the original ratio), but another problem is that now not enough horizontal grid lines are shown (max 3 in my resized example, probably due to a default value?).

Here is an example (min/max eval 7), it prints now only the -5 0 +5 lines and info, which is too less, I think it should may be print 1 line at least for 1 eval point, or similar?

TCEC-SUFI19_clean_6

rwbc commented 3 years ago

While thinking about it again, may be this resizing options aren't necessary at all, because usually the plots will be added either to html pages or sheets and here we can scale easily by other means. Even if we really want to physically resize them there are lots of tools out which can even do batch-resizing, under Win I always use IrfanView (=freeware) for this and have often done this alrady for websites (saving space for mass pictures and creating thumbnails).

Still the too less horizontal grids should be changed though. What is your opinion? I think in the original size there are at max 4 horizontal grid lines, IIRC.

fsmosca commented 3 years ago

New version 0.7.0 has more yticks, depending on the max and min eval values. Figure size: default or 6x4 Eval Limit: -7/7

Command line

python plot.py --input TCEC_Season_19_-_Superfinal.pgn --tcec --white-line-color yellow --black-line-color red --plot-bg-color "#01104C" --min-eval-limit -7 --max-eval-limit 7

Max ytick spacing of 1.0

If eval is 4 pawns or more set tick to 1 in here. This can be optimized further.

plot

Min ytick spacing of 0.05

minspace

I have no formula yet on how to deal with font size depending on the figure size. I will spend some time first on the default 6x4 size, its fonts and others.