It's tricky to try to work with the hazard per se in a Cox model, as it isn't directly estimated. The Cox model's regression coefficient for a predictor is the log-hazard difference versus its reference value. After the model is fit you can then estimate the hazard function for a set of reference predictor values and adjust it for other predictor values, but that hazard will be exactly 0 between event times.
What you seem to be doing it to calculate an average hazard over some period of time (cumulative hazard at time $t$ divided by $t$) as a function of the continuous predictor. I'd be reluctant to do that, as that depends on the choice of time span, with cumulative hazards unbounded over time. See Wikipedia.
What's typically done in this situation is to start with reference values for all predictors in the model.* For example, choose the average value of your continuous predictor as its reference, and choose representative values of the other predictors.
Then make a set of predictions (with confidence intervals) from the model, relative to that set of reference values, over a range of values of your continuous predictor of interest. You can then plot the linear predictor (log-hazard) from the model or exponentiate it to get the hazard ratio with respect to the reference condition.
One warning: if you include only a single term for a continuous predictor in your model, the model assumes that the log-hazard is linearly associated with the predictor value. That's often not a good assumption. If you did that, then the plot I recommend will be a straight line on the log-hazard scale.
You should consider modeling a continuous predictor flexibly, for example via a regression spline. See Chapter 2 of Frank Harrell's Regression Modeling Strategies, for example.
*Software for fitting Cox models chooses a set of reference values, but the default choices might not necessarily make sense for your application.