/* ---------------------------------------------------------------- */

void Plot_Well_Leg_mpic(Display *dpy, Window xwin, GC gc, mpic *mplot)
  {
  int i, x, x2, y, y2, bsiz = 24;
  
  y = user_to_pix_y(&mplot->gr, mplot->origin.minx);
  y2 = user_to_pix_y(&mplot->gr, (double)((float)mplot->origin.maxy));
  x = user_to_pix_x(&mplot->gr, mplot->origin.minx);
  x2 = user_to_pix_x(&mplot->gr, (double)((float)mplot->origin.maxx));
  x2 = mplot->ScreenX - 50; 

  for(i = 0; i <mplot->well_leg.Num ; i++)
    {
    /* printf("Geo-Table %s %d \n", mplot->well_leg.leg_in[i].name,
       mplot->well_leg.leg_in[i].col); */

    XSetForeground(dpy, gc, mplot->colors[XmapAppColor( mplot->well_leg.leg_in[i].col )]);
    XFillRectangle(dpy, xwin, gc, x2, 10 + (i + 1) * bsiz, bsiz, bsiz);

    XSetForeground(dpy, gc, mplot->colors[XmapAppColor(mplot->text_col)]);
    XDrawRectangle(dpy, xwin, gc, x2, 10 + (i + 1) * bsiz, bsiz, bsiz);

    XSetForeground(dpy, gc, mplot->colors[XmapAppColor(mplot->text_col)]);
    draw_just_text(dpy, xwin, gc, x2 + bsiz + 5, (10 + (i + 1) * bsiz + 3
						  * bsiz / 4),
		   mplot->well_leg.leg_in[i].name, HJ_LEFT, VJ_BASELINE);
    }   
  }
