DPlot Forum Index DPlot
http://www.dplot.com
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

LineType macro crash

 
Post new topic   Reply to topic    DPlot Forum Index -> Suggestions/Questions
View previous topic :: View next topic  
Author Message
James Gran



Joined: 11 Jul 2011
Posts: 7

PostPosted: Mon Jul 11, 2011 12:57 pm    Post subject: LineType macro crash Reply with quote

This macro crashes on LineType[n,1] when the graph has fewer than n lines. Color[n, x,x,x] keeps going without crash. Suggestion?

' Postpone redrawing until done
'
PostponeRedraw()
Color(1,255,0,0)
Color(2,255,0,0)
Color(3,0,0,255)
Color(4,0,0,255)
Color(5,0,128,0)
Color(6,0,128,0)
Color(7,255,128,0)
Color(8,255,128,0)
Color(9,128,0,0)
Color(10,128,0,0)
Color(11,128,128,255)
Color(12,128,128,255)
'Color(13,0,255,0)
'Color(14,0,255,0)
'Color(15,255,0,255)
'Color(16,255,0,255)
'Color(17,0,255,255)
'Color(18,0,255,255)
'Color(19,255,255,0)
'Color(20,255,255,0)

'set all line widths to 0.020"
LineWidth(-2,20)

'make odd numbered lines solid
'and even numbered lines dashed
LineType(1,1)
LineType(2,5)
LineType(3,1)
LineType(4,5)
LineType(5,1)
LineType(6,5)
LineType(7,1)
LineType(8,5)
LineType(9,1)
LineType(10,5)
LineType(11,1)
LineType(12,5)
'LineType(13,1)
'LineType(14,5)
'LineType(15,1)
'LineType(16,5)
'LineType(17,1)
'LineType(18,5)
'LineType(19,1)
'LineType(20,5)
'
'Now redraw the plot:
'
ViewRedraw()
Back to top
View user's profile Send private message
DPlotAdmin
Site Admin


Joined: 24 Jun 2003
Posts: 2311
Location: Vicksburg, Mississippi

PostPosted: Mon Jul 11, 2011 4:44 pm    Post subject: Reply with quote

Whoa, now! I cause enough crashes without calling a legitimate error message a crash! Very Happy

It bothers me a bit that Color and LineType aren't consistent and I'll likely change this. In the meantime you can get around the error message by setting the maximum number of curves to the largest curve index you'll use in your macro. (Double click on the Max Size area of the status bar).
_________________
Visualize Your Data
support@dplot.com
Back to top
View user's profile Send private message Send e-mail Visit poster's website
James Gran



Joined: 11 Jul 2011
Posts: 7

PostPosted: Mon Jul 11, 2011 6:03 pm    Post subject: Reply with quote

Sorry to have overstated the severity of the problem. My work-around is to Redraw after the error message.
Back to top
View user's profile Send private message
James Gran



Joined: 11 Jul 2011
Posts: 7

PostPosted: Fri Jul 15, 2011 11:23 am    Post subject: Reply with quote

2.3.1.6 fixed this problem. Thanks.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    DPlot Forum Index -> Suggestions/Questions All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group