X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=src%2Fcartesian.c;h=9dceb304ebb75c33477d5989b9bac0b512ba5baf;hb=3c2526641a2e88ff6dec7ea6ae5ffc063daf6957;hp=22201e4e4e4daa3c6caf8f2f805aa243abb5382b;hpb=2c4c4a789e9c23478bce195d2ed98bab6064dfc1;p=pspp diff --git a/src/cartesian.c b/src/cartesian.c index 22201e4e4e..9dceb304eb 100644 --- a/src/cartesian.c +++ b/src/cartesian.c @@ -14,8 +14,8 @@ You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA - 02111-1307, USA. */ + Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA + 02110-1301, USA. */ #include @@ -133,24 +133,22 @@ write_legend(struct chart *chart, const char *heading, void chart_datum(struct chart *ch, int dataset UNUSED, double x, double y) { - if ( ! ch ) return ; + { + const double x_pos = + (x - ch->x_min) * ch->abscissa_scale + ch->data_left ; + const double y_pos = + (y - ch->y_min) * ch->ordinate_scale + ch->data_bottom ; - const double x_pos = - (x - ch->x_min) * ch->abscissa_scale + ch->data_left ; - - const double y_pos = - (y - ch->y_min) * ch->ordinate_scale + ch->data_bottom ; - - pl_savestate_r(ch->lp); + pl_savestate_r(ch->lp); - pl_fmarker_r(ch->lp, x_pos, y_pos, 6, 15); - - pl_restorestate_r(ch->lp); + pl_fmarker_r(ch->lp, x_pos, y_pos, 6, 15); + pl_restorestate_r(ch->lp); + } } /* Draw a line with slope SLOPE and intercept INTERCEPT.