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

How to get jenkins to deploy .war file to tomcat6 not localhost

maven deployment jenkins tomcat6 pom.xml

I have a jenkins ci that builds our projects and make a .war file of it.

Saving/Reading a file from File.applicationStorageDirectory in an iPad Flex4.5 app

actionscript-3 flex flex4.5 flex-mobile

I have a Flex application (SDK 4.5.1) which runs on iPad... I need to download any files, put them in local directory (like the File.applicationStorageDirectory) and then view the file inside my

About UNIX Resources Network

Original, collect and organize Developers related documents, information and materials, contains jQuery, Html, CSS, MySQL, .NET, ASP.NET, SQL, objective-c, iPhone, Ruby on Rails, C, SQL Server, Ruby, Arrays, Regex, ASP.NET MVC, WPF, XML, Ajax, DataBase, and so on.