FileSaveAs won't save curren ManualScale

Have a suggestion for improving DPlot or a question about existing features? Let us know

Moderator: DPlotAdmin

Post Reply
Tom Chien
Posts: 11
Joined: Thu Sep 15, 2005 8:57 am

FileSaveAs won't save curren ManualScale

Post by Tom Chien »

DPlot_Plot, ManualScale work fine.
FileSaveAs also works fine but it won't take the updated plot after ManualScale.

i [code]f ((DocNum = DPlot_Plot(&DPlot,X,Y,NULL)) <= 0) return -3 ;
if (dPlot_Command(DocNum, "[ManualScale(,-0.08,,0.08)]") <= 0) return -4;
if dPlot_Command(DocNum,"[FileSaveAs(1,\"H:\\FRDSpiP\\DPLOT\\|TITLE1|\")]") <= 0) return -4; [/code]
User avatar
DPlotAdmin
Posts: 2312
Joined: Tue Jun 24, 2003 9:34 pm
Location: Vicksburg, Mississippi
Contact:

Post by DPlotAdmin »

I tried a test just now and it worked fine for me. Try adding a [ViewRedraw()] after your ManualScale command and see if that makes a difference. It shouldn't, but I've been wrong before.
Visualize Your Data
support@dplot.com
Tom Chien
Posts: 11
Joined: Thu Sep 15, 2005 8:57 am

Post by Tom Chien »

I try to give better picture of code as follows:
[code] DPlot.DataFormat = DATA_XYXY; //DATA_XYXY
DPlot.MaxCurves = 1;
DPlot.NumCurves = 1;
DPlot.MaxPoints = m ;
DPlot.NP[0] = DPlot.MaxPoints ;
DPlot.SymbolType[0] = SYMBOLSTYLE_DOT ;
DPlot.LineType[0] = LINESTYLE_NONE ;
sprintf(DPlot.Title[0], "%08daRRR", (int)dsP->no) ;
if ((DocNum = DPlot_Plot(&DPlot,X,Y,NULL)) <= 0) return -3 ; //

if (dPlot_Command(DocNum, "[ManualScale(,-0.08,,0.08)]") <= 0) return -4;

if (dPlot_Command(DocNum,"[FileSaveAs(1,\"H:\\FRDSpiP\\DPLOT\\|TITLE1|\")]") <= 0) return -4;
if (dPlot_Command(DocNum, "[FileClose()]") <= 0) return -5;

[/code] when I go step by step, "ManualScale" is doing OK. After "FileSaveAs" the screen goes back previous one before "ManualScale". And the file saved is previous one before "ManualScale".

Please make another try!
User avatar
DPlotAdmin
Posts: 2312
Joined: Tue Jun 24, 2003 9:34 pm
Location: Vicksburg, Mississippi
Contact:

Post by DPlotAdmin »

Sorry for the trouble. I found a mistake associated with leaving out parameters to the ManualScale command when those values have not been previously set, either by another ManualScale command or interactively in DPlot. There's nothing you can do to fix this now other than specifying the low and high X values. I'll fix this in the next release.
Visualize Your Data
support@dplot.com
Post Reply