How to add title, labels and legend to a Calcpad plot?

Calcpad does not provide options to add titles, axis labels and legends to function plots like in Excel. However, you can decorate your plots with these attributes by your own, by using a little Html.

Bellow, you can find a sample code that you can use as a boilerplate. Since chart colors are predefined, they will be the same for all your future plots:

'<div style="width:400pt;">
'<h3><center>Title</center></h3>
'Label Y
$Plot{f_1(x) & f_2(x) & f_3(x) & f_4(x) & f_5(x) & f_6(x) & x_7|y_7 & x_8|y_8 & x_9|y_9 & x_10|y_10 @ x = a : b}
'<p style="float:right">Label X</p>
'<p><b>Legend:</b></p>
'<p><b style="color:Red">▬▬</b> Chart 1 &emsp;&emsp; 
'<b style="color:Green">▬▬</b> Chart 2 &emsp;&emsp; 
'<b style="color:Blue">▬▬</b> Chart 3</p>
'<p><b style="color:Goldenrod">▬▬</b> Chart 4 &emsp;&emsp; 
'<b style="color:Magenta">▬▬</b> Chart 5 &emsp;&emsp; 
'<b style="color:DarkCyan">▬▬</b> Chart 6</p>
'<p><b style="color:Purple">●</b> Point 7 &emsp; 
'<b style="color:DarkOrange">●</b> Point 8 &emsp; 
'<b style="color:Maroon">●</b> Point 9 &emsp; 
'<b style="color:YellowGreen">●</b> Point 10</p>
'</div>

And here is how it looks inside Calcpad:

If you have less charts, you can delete the extra lines. Also, there is an option for points, if both x and y are fixed. If you have any questions, please do not hesitate to ask them right away.

Published by Calcpad

Hi, my name is Ned. I am a structural engineer with over 20 years of experience in the design of nuclear and industrial facilities, factories, residential and public buildings. I am a fan of engineering, mathematics and computer programming. I spend a lot of time for developing of useful tools that help structural design.

2 thoughts on “How to add title, labels and legend to a Calcpad plot?

  1. Hi,

    I have two list A and B and I want to plot the graph between this two list using plot function, the two list are not directly related so difficult to make a function between them.

    Thank you for the suggestion

    Like

Leave a comment