Core Plot graph does not resize sometime

I have created a graph using core plot. Graph is shown in on the screen perfectly. i have a full screen button on tap on it a popOver shows the graph in a bigger frame... The problem is that when i resize the graph sometime it does not resize..

If i dismiss the popover I can still see a big char on my screen. This does not happen all the time.

in my .h file

     CPGraphHostingView *scatterPlotView;
 CPXYGraph *graph, *barChart;

in my .m file

I have created the chart and now on the ful screen button click.


UIViewController* popoverContent = [[UIViewController alloc]
UIView* popoverView = [[UIView alloc]
                       initWithFrame:CGRectMake(0, 212, 1024, 480)];

    popoverView.frame = CGRectMake(0, 212, 768, 700);

popoverView.backgroundColor = [UIColor blackColor];
popoverContent.view = popoverView;

//resize the popover view shown
//in the current view to the view's size
popoverContent.contentSizeForViewInPopover = CGSizeMake(980, 460);


    popoverContent.contentSizeForViewInPopover = CGSizeMake(768-40, 660);

//create a popover controller
UIPopoverController * popoverController21 = [[UIPopoverController alloc]initWithContentViewController:popoverContent];

self.popoverController = popoverController21;
[popoverController21 release];
self.popoverController.delegate = self;

CGRect btnRct = fullViewBtn.frame;

//present the popover view non-modal with a
//refrence to the button pressed within the current view

[self.popoverController presentPopoverFromRect:btnRct
                      permittedArrowDirections: UIPopoverArrowDirectionUp
    scatterPlotView.frame = CGRectMake(5, 10, 980, 460);
    scatterPlotView.frame  = CGRectMake(5, 10, 768-40, 660);
[popoverView addSubview:scatterPlotView];
    [touchView removeFromSuperview];
    touchView.frame =scatterPlotView.frame;
    [popoverView addSubview:touchView];
//release the popover content
   [popoverView release];
   [popoverContent release];


Here touchView is the object of UIView used to add annotation when user taps on the chart.

In short I am just changing the frame of my CPGraphHostingView. but why it does not resize sometimes.


What version of Core Plot are you using? Based on the "CP" class prefix in your code, I suspect it's pretty old. An update to a newer version might solve this problem for you.

Need Your Help

Calculate Cyclomatic Complexity for Javascript

javascript metrics cyclomatic-complexity

Are there any tools available for calculating Cyclomatic Complexity in Javascript?

How to decide whether to use a RDBMS, Doc/Obj ODBMS or Graph?

rdbms database-schema graph-databases oodbms

What I intend to design basically boils down to a list of users, organisations, events, addresses and comments which could quite easily be maintained in a RDBMS such as MySQL. However, if the project