none
Using ScaleTransform with graphing a function on an axis RRS feed

  • Question

  • I am trying to understand how to use the ScaleTransform method.  I am setting up an x-y axis inside a picturebox where the center point is at 0,0. Now I would like to make the x-y axis the width and height of my picturebox and I can do that. The problem happens when I draw a line with large points for the graph and when I make a chart of a much smaller coordinated line it is to small for my purposes. TTT recommended I use the Transform and I have tried but I don't think I am going about it the right way. It seems that all it does is magnifies the graph and axis but I think I need to change the actual inside coordinates of the picturebox if possible. I have included an example which will visually show you my problem.  I was hoping that I could set up the axis and grid up initially and if my graph has large numbered coordiantes I could just set the viewport to what I need.

    Tuesday, November 6, 2018 2:48 AM

Answers

All replies

  • Hi,

    Are you using the wpf project to accomplish your purpose?

    Best Regards,

    Alex


    MSDN Community Support Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    Tuesday, November 6, 2018 5:56 AM
  • Hi Alex,

    No I am not I am using Windows Form, why do you ask?

    Les

    Tuesday, November 6, 2018 6:42 AM
  • Hi Alex,

    I think I developed a routine that works.  I still would like to hear why you asked about the WPF.

    What do I do if I don't want my post to be shown here since I figured it out? If I don't hear from someone telling me what to do to cancel this post by tomorrow I will try to delete it.

    Thanks,

    Les

    • Proposed as answer by tommytwotrain Tuesday, November 6, 2018 12:02 PM
    Tuesday, November 6, 2018 7:20 AM
  • Hi Alex,

    I think I developed a routine that works.  I still would like to hear why you asked about the WPF.

    What do I do if I don't want my post to be shown here since I figured it out? If I don't hear from someone telling me what to do to cancel this post by tomorrow I will try to delete it.

    Thanks,

    Les

    Hi Les,

    I'm so sorry,I just want to confirm if you are using the ScaleTransform method of wpf.

    Best Regards,

    Alex


    MSDN Community Support Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    Tuesday, November 6, 2018 7:48 AM
  • Les,

    I dont think you can delete a post after someone has responded. The sysop has to do that. Its not a big thing. Just mark your post as the answer or something to close the thread.

    Here is more transforms with pictures:

    https://social.technet.microsoft.com/wiki/contents/articles/31270.vb-net-size-and-rotate-images-using-matrix-transforms-in-gdi.aspx

    • Marked as answer by Les2011 Tuesday, November 6, 2018 3:15 PM
    Tuesday, November 6, 2018 11:41 AM
  • Hi TTT,

    For some reason my reply to you did not show up.  I just wanted to say that your link to explanation of transforms was excellent.

    Thanks

    Les

    Tuesday, November 6, 2018 4:12 PM