/[pspp]/pspp/src/cartesian.c
ViewVC logotype

Diff of /pspp/src/cartesian.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.5 by jmd, Thu Dec 2 05:52:51 2004 UTC revision 1.6 by jmd, Fri Jan 14 04:05:47 2005 UTC
# Line 53  write_legend(struct chart *chart, const Line 53  write_legend(struct chart *chart, const
53  void  void
54  chart_write_xlabel(struct chart *ch, const char *label)  chart_write_xlabel(struct chart *ch, const char *label)
55  {  {
56      if ( ! ch )
57        return ;
58    
59    pl_savestate_r(ch->lp);    pl_savestate_r(ch->lp);
60    
# Line 69  chart_write_xlabel(struct chart *ch, con Line 71  chart_write_xlabel(struct chart *ch, con
71  void  void
72  chart_write_ylabel(struct chart *ch, const char *label)  chart_write_ylabel(struct chart *ch, const char *label)
73  {  {
74      if ( ! ch )
75        return ;
76    
77    pl_savestate_r(ch->lp);    pl_savestate_r(ch->lp);
78    
79    pl_move_r(ch->lp, ch->data_bottom, ch->ordinate_right);    pl_move_r(ch->lp, ch->data_bottom, ch->ordinate_right);
# Line 86  write_legend(struct chart *chart, const Line 91  write_legend(struct chart *chart, const
91  {  {
92    int ds;    int ds;
93    
94      if ( ! chart )
95        return ;
96    
97    
98    pl_savestate_r(chart->lp);    pl_savestate_r(chart->lp);
99    
100    pl_filltype_r(chart->lp,1);    pl_filltype_r(chart->lp,1);
# Line 124  write_legend(struct chart *chart, const Line 133  write_legend(struct chart *chart, const
133  void  void
134  chart_datum(struct chart *ch, int dataset UNUSED, double x, double y)  chart_datum(struct chart *ch, int dataset UNUSED, double x, double y)
135  {  {
136    
137      if ( ! ch )
138        return ;
139    
140    
141    
142    const double x_pos =    const double x_pos =
143      (x - ch->x_min) * ch->abscissa_scale + ch->data_left ;      (x - ch->x_min) * ch->abscissa_scale + ch->data_left ;
144    
145    const double y_pos =    const double y_pos =
146      (y - ch->y_min) * ch->ordinate_scale + ch->data_bottom ;      (y - ch->y_min) * ch->ordinate_scale + ch->data_bottom ;
147    
   
148    pl_savestate_r(ch->lp);        pl_savestate_r(ch->lp);    
149        
150    pl_fmarker_r(ch->lp, x_pos, y_pos, 6, 15);    pl_fmarker_r(ch->lp, x_pos, y_pos, 6, 15);
# Line 151  chart_line(struct chart *ch, double slop Line 165  chart_line(struct chart *ch, double slop
165    double x1, y1;    double x1, y1;
166    double x2, y2 ;    double x2, y2 ;
167    
168      if ( ! ch )
169        return ;
170    
171    
172    if ( lim_dim == CHART_DIM_Y )    if ( lim_dim == CHART_DIM_Y )
173      {      {
174        x1 = ( limit1 - intercept ) / slope ;        x1 = ( limit1 - intercept ) / slope ;

Legend:
Removed from v.1.5  
changed lines
  Added in v.1.6

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26