craigsapp / jrp-data-server

Backend data server for Josquin Research Project
1 stars 0 forks source link

Avoid negative measure numbers on x-axis of activity plots #1

Closed craigsapp closed 8 months ago

craigsapp commented 8 months ago

Activity plot x-axis range is currently determined automatically (by gnuplot):

image

https://data.josqu.in/Fsc2012-activity-merged.png

In this case there are 65 measures, and the x-axis is completely filled.

However in some cases, the x-axis range extends further to the left and right:

image

https://data.josqu.in/Mlu2007-activity-merged.png

In this case there are 131 measures in the score, and the automatic range goes to 135.

The x-axis range should be set explicitly to avoid extra padding space at the start/end of the plot.

For merged activity plots, subtract 1 from the first measure and add 1 to the last measure in order to have the display not clipped to 1/2 of a box.

Gnuplot instruction for setting the x-axis range explicitly:

set xrange [0:10]

(for 0 to 10).

-=+Craig

craigsapp commented 8 months ago

Merged activity plots now do not add extra space to get to a regularly spaced tick value on the x-axis:

Screenshot 2024-01-27 at 19 31 33

Also for separate activity plots, the same is done, but the left side of the range is decreased by one and the right side is increased by one to display the full pixel for the start/stop measures:

Screenshot 2024-01-27 at 19 34 08
craigsapp commented 8 months ago

The updated plots are now online (where the correct font is used for the mensuration sign):

image