I am new to gnuplot, I need to plot my data and display a small circle or an arrow at each end of the line chart. how can I do that?
I use this command to display the line chart:
plot 'data.txt' with lines
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
I don’t know if there is a way to make lines have something at the end automatically, but I found a workaround. With this data file:
and the following script:
I can make a plot like this:
The
statscommand is to find the number of data points, then the dual plot command draws the line connecting the data points, then a circle only on the last data point (determined with thea_recordsvariable. An arrow would be trickier to draw…To find more info about different point/line style options, the
testcommand at the gnuplot command line is your friend.