0
votes

How do I set an initial zoom based the maximum value of the x-axis and y-axis?

Example:

Plot 1:

Maximum value: x-axis = 100; y-axis = 110;

Plot 2:

Maximum value: x-axis = 180; y-axis = 230;

I need to the initial zoom be equal to two plots.

Regards

1
Are the plots in the same plot space? - Eric Skroch
Yes, I use one plot space on one view controller to show three differents Bar plot types - Gian

1 Answers

1
votes

This will adjust the plot space to fit the plot data for two plots:

[plotSpace scaleToFitPlots:@[plot1, plot2]];

You can use this shortcut to scale the plot space to fit all of the plots in a graph:

[plotSpace scaleToFitPlots:[graph allPlots]];