1

I am trying to plot individual data points on a line plot I already made as follows:

p=plot('3.29*exp(-17.4*(x^2))-0.908',xrange=[0.,1.],yrange=[-1.,1.5])

I first tried overplotting a point like this but nothing appears on the graph

estimate1=plot([0.549],[0.755],overplot=1)

When I give the plot function two points to overplot by adding another set of x and y values in input vectors, it connects them.

estimate=plot([0.349,0.9595],[0.555,0.9995],overplot=1)

How can I (over)plot the points without them being connected? enter image description here

Bereket
  • 55
  • 8
  • Are you looking for the scatterplot function? It also has the overplot keyword: https://www.harrisgeospatial.com/docs/scatterplot.html – jitter Jul 23 '20 at 19:49
  • @jitter, thank you for your input. I am using the `equation` property of the plot function to let IDL generate data points to draw the thick line in the fig above. I don't believe the scatterplot function has this property. – Bereket Jul 24 '20 at 15:18

2 Answers2

1

You should be able to set linestyle = 6 which will plot without the line.

Steve G
  • 182
  • 9
0

I found a way around the problem I was having. After choosing a symbol for the points I wanted to show, I simply set the transparency of the line connecting them to 100 and the symbol transparency to 0.

estimate1.symbol='diamond'
estimate1.transparency=100
estimate1.sym_transparency=0

The work around is not elegant, but it works.

Bereket
  • 55
  • 8