People v. Nocelotl, 211 Cal.App.4th 496, 149 Cal.Rptr.3d 706 (6th Dist. Nov. 28, 2012) (Section 1018 provides that ... On application of the defendant at any time before judgment ... the court may, ... for a good cause shown, permit the plea of guilty to be withdrawn and a plea of not guilty substituted. Good cause must be shown for such a withdrawal, based on clear and convincing evidence. [Citation.] [Citations.] To establish good cause, it must be shown that defendant was operating under mistake, ignorance, or any other factor overcoming the exercise of his free judgment. [Citations.] ... The burden is on the defendant to present clear and convincing evidence the ends of justice would be subserved by permitting a change of plea to not guilty. [Citation.] [] When a defendant is represented by counsel, the grant or denial of an application to withdraw a plea is purely within the discretion of the trial court after consideration of all factors necessary to bring about a just result. [Citations.] On appeal, the trial court's decision will be upheld unless there is a clear showing of abuse of discretion. [Citations.] [Citation.] Guilty pleas resulting from a bargain should not be set aside lightly and finality of proceedings should be encouraged. [Citation.] ( People v. Weaver (2004) 118 Cal.App.4th 131, 145"146, 12 Cal.Rptr.3d 742. . . . In any event, the trial court's decision was not arbitrary, whimsical, or capricious. (See, e.g., People v. Cortez (1971) 6 Cal.3d 78, 85"86, 98 Cal.Rptr. 307, 490 P.2d 819.)).