Toronto_Guy Tracker
https://communities.sas.com/kntur85557/tracker
Toronto_Guy TrackerSat, 14 Sep 2024 03:42:33 GMT2024-09-14T03:42:33ZRe: How do I Format a spline interpolation curve based on binary variable value
https://communities.sas.com/t5/Graphics-Programming/How-do-I-Format-a-spline-interpolation-curve-based-on-binary/m-p/442066#M15248
<P>Wow this is so awesome. I feel so special <span class="lia-unicode-emoji" title=":slightly_smiling_face:">ðŸ™‚</span></P><P> </P><P>Thank you for letting me know and for all the help provided by everyone else.</P><P> </P><P> </P>Sat, 03 Mar 2018 17:43:02 GMThttps://communities.sas.com/t5/Graphics-Programming/How-do-I-Format-a-spline-interpolation-curve-based-on-binary/m-p/442066#M15248Toronto_Guy2018-03-03T17:43:02ZRe: How do I Format a spline interpolation curve based on binary variable value
https://communities.sas.com/t5/Graphics-Programming/How-do-I-Format-a-spline-interpolation-curve-based-on-binary/m-p/441660#M15242
<P>Thank you all for the replies.</P><P> </P><P>I will try to include these recommendations and will report back with results</P>Fri, 02 Mar 2018 18:05:37 GMThttps://communities.sas.com/t5/Graphics-Programming/How-do-I-Format-a-spline-interpolation-curve-based-on-binary/m-p/441660#M15242Toronto_Guy2018-03-02T18:05:37ZRe: How do I Format a spline interpolation curve based on binary variable value
https://communities.sas.com/t5/Graphics-Programming/How-do-I-Format-a-spline-interpolation-curve-based-on-binary/m-p/441622#M15236
<P>Thanks for the quick reply!</P><P> </P><P>I will try to use the suggestions you provided to see if I can come up with the answer</P>Fri, 02 Mar 2018 16:43:55 GMThttps://communities.sas.com/t5/Graphics-Programming/How-do-I-Format-a-spline-interpolation-curve-based-on-binary/m-p/441622#M15236Toronto_Guy2018-03-02T16:43:55ZHow do I Format a spline interpolation curve based on binary variable value
https://communities.sas.com/t5/Graphics-Programming/How-do-I-Format-a-spline-interpolation-curve-based-on-binary/m-p/441611#M15234
<P>Hi everyone,</P><P> </P><P>This is my first post </P><P> </P><P>I have used these forums for years now to answer a lot of the questions I had. I have successfully found an answer to all my questions up until this point. I would like to thank everyone for their great help.</P><P> </P><P>However, I am really stuck now and it seems no one has ever asked this question.</P><P> </P><P>I would like to be able to format pieces of my curves based on a binary variable that is not used for plotting the curves. If the value of this variable is 1 then the curves need to be formatted one way and if 0 the curves need to be formatted in a different way.</P><P> </P><P>I am attaching an excel file with 2 pictures. One with the output that is produced from the code given below and the other is a picture of what I would like to have.</P><P> </P><P>Here is the relevant code that produces the "Example of output I have".</P><P> </P><PRE><CODE class=" language-sas">data code;set sys.&project.data;
title "Example";
Axis1 Label = ("Percent") order=(0 to 0.7 by 0.1);
legend1 label = ("Curves");
proc gplot data=code;
symbol1 interpol=sm25 height=0.1 value = NONE width = 3 mode = include;
plot (a b c d)*time /haxis = 0 to 60 by 10 OVERLAY legend
vaxis = axis1 legend = legend1;
format a percent5. b percent5. c percent5. d percent5.;
run;
quit;</CODE></PRE><P>I am not providing the entire data set as it is 2400 rows.</P><P> </P><P>But here is a dummy example of how it looks:</P><TABLE border="0" cellspacing="0" cellpadding="0"><TBODY><TR><TD>Curve Name</TD><TD>time</TD><TD>Y-value</TD><TD>Binary Variable</TD></TR><TR><TD>a</TD><TD>0.1</TD><TD>0</TD><TD>1</TD></TR><TR><TD>a</TD><TD>0.2</TD><TD>0.1</TD><TD>1</TD></TR><TR><TD>a</TD><TD>0.3</TD><TD>0.2</TD><TD>1</TD></TR><TR><TD>a</TD><TD>0.4</TD><TD>0.1</TD><TD>0</TD></TR><TR><TD>a</TD><TD>0.5</TD><TD>0.4</TD><TD>0</TD></TR><TR><TD>b</TD><TD>0.1</TD><TD>0.25</TD><TD>1</TD></TR><TR><TD>b</TD><TD>0.2</TD><TD>0.5</TD><TD>1</TD></TR><TR><TD>b</TD><TD>0.3</TD><TD>0.7</TD><TD>0</TD></TR><TR><TD>b</TD><TD>0.4</TD><TD>0.264</TD><TD>0</TD></TR><TR><TD>b</TD><TD>0.5</TD><TD>0.416</TD><TD>0</TD></TR><TR><TD>c</TD><TD>0.1</TD><TD>0</TD><TD>1</TD></TR><TR><TD>c</TD><TD>0.2</TD><TD>0</TD><TD>0</TD></TR><TR><TD>c</TD><TD>0.3</TD><TD>0</TD><TD>1</TD></TR><TR><TD>c</TD><TD>0.4</TD><TD>0.67</TD><TD>1</TD></TR><TR><TD>c</TD><TD>0.5</TD><TD>0</TD><TD>0</TD></TR><TR><TD>d</TD><TD>0.1</TD><TD>0.8674</TD><TD>0</TD></TR><TR><TD>d</TD><TD>0.2</TD><TD>0</TD><TD>0</TD></TR><TR><TD>d</TD><TD>0.3</TD><TD>0.4674</TD><TD>1</TD></TR><TR><TD>d</TD><TD>0.4</TD><TD>0</TD><TD>1</TD></TR><TR><TD>d</TD><TD>0.5</TD><TD>0.6465</TD><TD>0</TD></TR></TBODY></TABLE><P> </P><P>The time variable goes from 0.1 to 60. There are 4 curves (a,b,c,d). The Y-value is a continuous variable that range from 0 - 1. The binary variable is either 0 or 1. The data I provided is only an example for time 0.1 - 0.5.</P><P> </P><P>Basically what I would like to have as output is shown in the "<SPAN>Example of output I need" picture</SPAN></P><P> </P><P><SPAN>Essentially wherever the binary variable is 0 the curve is formatted one way and where the binary variable is 1 the curve needs to be formatted differently (in the case of the example it is made thicker).</SPAN></P><P> </P><P><SPAN>Any thoughts? I have spent days trying all sorts of work around methods but I can't seem to do this Other than outputting the curves I already have and painstakingly (and very inaccurately) using the brush tool in paint to thicken the curves in the correct spots. As you can imagine this is very time consuming, inaccurate and just flat out strange and unscientific thing to do.</SPAN></P><P> </P><P><SPAN>Thanks everyone!</SPAN></P><P> </P><P> </P><P> </P><P> </P><P> </P><P> </P>Fri, 02 Mar 2018 16:29:41 GMThttps://communities.sas.com/t5/Graphics-Programming/How-do-I-Format-a-spline-interpolation-curve-based-on-binary/m-p/441611#M15234Toronto_Guy2018-03-02T16:29:41Z