Pyrite | Level 9

## distribution without markers/dots

Hi all,

I two numeric-Continuous variables. I'd like to draw a distribution where one continues variable x-axis and the other one is y-axis. I draw scatter plots with the curve but I don't want dots in the graph. It should be more like Kernel or Normal distribution. However, as I know I can draw Kernel or Normal distribution with only one variable using density. I want a distribution as seen below.

Could you help me to draw it?

Thanks.

1 ACCEPTED SOLUTION

Accepted Solutions
Super User

## Re: distribution without markers/dots

Using @PeterClemmensen's data set.

Maybe:

```proc sgplot data=have;
pbspline x=scores y=ss;
run;```

or

```proc sgplot data=have;
reg x=scores y=ss / degree=3 nomarkers;
run;```

We kind of need a bit more description of your expectations than "no dots".

6 REPLIES 6
Tourmaline | Level 20

## Re: distribution without markers/dots

Can you post your data or a sample of it?

Pyrite | Level 9

## Re: distribution without markers/dots

Sure, Here it is! It is in the attachment.

Thanks

Pyrite | Level 9

## Re: distribution without markers/dots

the scores will be x-axis and ss will be y-axis.

Thanks

Tourmaline | Level 20

## Re: distribution without markers/dots

I'm not really sure how you expect this data to yield a plot like you posted. However, to get things started, you can fit a normal density plot like this

``````data have;
input scores ss;
datalines;
920 5.5
941 6.3
935 8.2
910 9.5
972 10.5
954 .
925 9.2
900 8.7
;

proc sgplot data=have;
density ss;
run;``````
Super User

## Re: distribution without markers/dots

Using @PeterClemmensen's data set.

Maybe:

```proc sgplot data=have;
pbspline x=scores y=ss;
run;```

or

```proc sgplot data=have;
reg x=scores y=ss / degree=3 nomarkers;
run;```

We kind of need a bit more description of your expectations than "no dots".

Pyrite | Level 9

## Re: distribution without markers/dots

Thank you so much!

I tried the second one and it worked!

Thank you!

Discussion stats
• 6 replies
• 839 views
• 1 like
• 3 in conversation