Menu

How to plot a few data points and leave the rest as legends on the chart?

Help
2017-12-21
2017-12-22
  • Ganesh Vaid

    Ganesh Vaid - 2017-12-21

    Hello,

    I have an interesting problem with gnuplotting.

    Lets say I have 50 datapoints on a 2-d chart... for eg: time vs sale of various products.
    Since the data gets crowded at times, the charts are not easily readable, visually appealing.

    I noticed an option, where when I click on the legend, it works as a toggle switch to either show or hide the gnuplot line for that item.

    I was wondering if I can make this a default by plotting for the first 10 items of the dataset and leave the rest as legends (with plot hidden). This will remove the plot line clutter and help me visualize the data better. If I'm interested in a datapoint, I'll toggle the legend and get my plot...

    Can you please give me hints on how to accomplish this?

    Thanks so much in advance.

     
  • Ethan Merritt

    Ethan Merritt - 2017-12-21

    gnuplot 5.2 has a "toggle" command that allows you to do the on/off operation from the gnuplot command line as an alternative to clicking with the mouse. See "help toggle".
    This command did not exist in 5.0

     
  • Ganesh Vaid

    Ganesh Vaid - 2017-12-22

    Thanks. I upgraded to 5.2 still I could not find any examples/tips in the internet that help solve my problem.

    Any ideas?

    Thanks in advance.

     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.