How to make plots in Java like in Matlab (same syntax)
<p>Plotting in Matlab is very easy and straightforward. For example:</p>

<pre><code>figure('Position_',[100,80,1000,600])         
plot(x,y1,'-.or','MarkerSize',0.2,'MarkerFaceColor','r','LineWidth',2)
xlabel('Matrix1')
ylabel('Matrix2')
grid on 
hold on
axis([-1,1,0,var1*1.2])
plot(x,y2,'-k','MarkerSize',0.5,'MarkerFaceColor','k','LineWidth',4)
title('My plot')
figuresdir = 'dir'; 
saveas(gcf,strcat(figuresdir, 'plotimage'), 'bmp');
</code></pre>

<p>I found, however, that plotting in Java is more difficult and I have to use packages like <a href="https://www.google.com/url?sa=t&amp;rct=j&amp;q=&amp;esrc=s&amp;source=web&amp;cd=1&amp;cad=rja&amp;uact=8&amp;ved=0ahUKEwiPu_fShL7OAhVJSRoKHcUFD10QFggeMAA&amp;url=https%3A%2F%2Fgithub.com%2Fyannrichet%2Fjmathplot&amp;usg=AFQjCNF7K6ikbuyNFsszSr7ItsLiFr4Q4w&amp;sig2=sH0sRU23ekO2dlm8Qo-5Kw" rel="nofollow">JMathPlot</a> or <a href="http://www.jfree.org/jfreechart/" rel="nofollow">JFreeChart</a>. However, I find it difficult to merge plots and print them to a file using these packages.</p>

<p>Is there an easy way to make plots in Java that uses (about) the same syntax as Matlab does?</p>