When comparing Raphael vs p5.js, the Slant community recommends p5.js for most people. In the question“What are the best JavaScript drawing libraries?” p5.js is ranked 2nd while Raphael is ranked 5th. The most important reason people chose p5.js is:
Reference documentation and lots of examples are available directly on the [website](http://p5js.org/).
Ranked in these QuestionsQuestion Ranking
Pros
Pro Works with older browsers
Because Raphael supports rendering VML + SVG, it is one of the few drawing libraries that is backwards compatible with older browsers that do not support canvas.
Pro Built in animations
Several built-in animations (such as ways of easing) are provided for you out of the box, but Raphael also allows cubic beziers for more complicated easing functions. Any drawing object property can be modified making it similar to css animations in jQuery.
Pro Every object is interactive with events
Everything that is drawn in Raphael is an object which means it is easy to manipulate any part of the rendered image after it is processed. It uses an event handler system for user inputs which makes it easy to learn for JavaScript developers used to event based libraries.
This style of handling objects makes Raphael a good fit for rendering interactive diagrams and charts that can also interact with other parts of the page.
Pro Easy creation of charts with extension
gRaphael is a Raphael extension to help you easily create graphs and charts.
Pro Accessible documentation
Reference documentation and lots of examples are available directly on the website.
Pro Great community
p5 users benefit from the Processing community's 15+ years of growth and discovery. Processing code can easily be converted to p5.
Pro General programming concepts
As a continuation of the Processing project, this frameworks helps in understanding the general programming concepts that goes beyond drawing (connecting electronics, using sounds or the webcam etc),
Pro Easiest to learn to obtain high grade results
In a few days any body can understand extremely complex figures in a few minutes.
Pro A lot of YouTube tutorials
Cons
Con Complicated, confusing documentation
The documentation is often not clear and lacks practical examples.
Con Can be difficult to get support
Online communities for Raphael are small and inactive compared to other drawing libraries, and many issues opened on github are never addressed.
Con No built-in rendering
If looking for something to build UIs with or similar, one might be disappointed by the lack of any pre-defined UI element objects and such in p5.js. One has to write all the rendering code for any objects one includes, integrating it appropriately with the loop.