Oscilloscope drawing - low-pass filter
I don't know for sure what's wrong with your setup, but I'll tell you the things I can see from your description.
The cutoff of your RC filter is around 340Hz.  As a simple RC filter, it has an attenuation of 20 dB per decade - that is, at ten times the frequency you have 1/10 the amplitude.
Your PWM frequency (3.9kHz) is about ten times the cutoff, so you can expect the pulses to be attenuated from 5V peak to peak to about 500 millivolts peak to peak.
For the midrange PWM values, you'll have the 500 mV as zig-zags in your display - big zig-zags.  At high and low PWM duty cycles it will be smoother.
Since your filter cutoff is 340 Hz, if you change the output any more often than 340 times per second the output won't be able to follow.  At 340 times a second the output will be noticeably wrong.  As you go faster, the distortion will be greater.  At some point, the filter output will appear to not change anymore in response to the changing PWM.
You probably need a much higher PWM frequency and a higher cutoff for your filter.  You want a very wide separation between the cutoff and the PWM frequency.
You want the cutoff high enough that you can quickly draw your display, but low enough that it can effectively remove the PWM frequency.
You can get familiar with RC low pass filters using this online calculator.

Make sure you use DC coupling on your scope inputs.

I've been working on a project that also uses a filtered PWM signal as a DAC.
The cutoff I used is about half of yours (159Hz,) and the PWM frequency is over twice as high (10kHz.)
I still have a pretty jagged output from the filter:

That's 1 volt per division, so the jaggies are about 200 to 300 millivolts peak to peak.
That is better than the results you will get with your PWM frequency and low pass filter.

The picture you posted of your filtered PWM looks wrong.  It looks to me almost like you have a high pass filter instead of a low pass filter.
You would wire a PWM low pass like this:

The pin marked &quot;D9&quot; is the PWM signal, VBias is the filtered output.
Check your circuit and see what you've really got.