radical-cybertools / radical.analytics

Analytics for RADICAL-Cybertools
Other
1 stars 1 forks source link

Negative values in the plot (`ra.get_plot_utilization`) #175

Open mtitov opened 1 year ago

mtitov commented 1 year ago

If small number of resources was used then it is obvious that the Y axis has negative values

https://github.com/radical-cybertools/radical.analytics/blob/4882015926fa291eb4bc4dc23f6b8922a894d109/src/radical/analytics/utils/plot.py#L421

Example of the resource utilization plot:

Screen Shot 2023-05-09 at 3 48 08 PM

p.s. in my tests, I've had the following correction

correction = 0.5
...
    legend, patches, x, y = ra.get_plot_utilization(
        METRICS, {sid: consumed}, p_zeros[sid][pid], sid)
    for patch in patches:
        patch.set_y(patch.get_y() + correction)
        axarr[idx].add_patch(patch)
...
    axarr[idx].set_ylim([int(y['min'] + correction), int(y['max'] + correction)])