Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6703319
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T07:09:26+00:00 2026-05-26T07:09:26+00:00

Please Consider : intense = Reverse[Round[Rationalize /@ N[10^Range[0, 3, 1/3]]]]; values = Range[0, 9/10,

  • 0

Please Consider :

intense = Reverse[Round[Rationalize /@ N[10^Range[0, 3, 1/3]]]];
values = Range[0, 9/10, 1/10];

intensityLegend = Column[Prepend[MapThread[
                         Function[{intensity, values},
                         Row[{Graphics[{(Lighter[Blue, values]),
                         Rectangle[{0, 0}, {4, 1}], Black, 
                         Text[Style[ToString[intensity], 16, Bold], {2, .5}]}]}]],
                        {intense, values}], Text[Style["Photons Number", Bold, 15]]]];

IntersectionDp1={{1., 588.377}, {2.15443, 580.306}, {4.64159, 573.466}, {10.,560.664}, 
                 {21.5443, 552.031}, {46.4159, 547.57}, {100.,545.051}, 
                 {215.443, 543.578}, {464.159, 542.281}, {1000., 541.346}}


FindD1=ListLogLinearPlot[Map[List, IntersectionDp1], 
                  Frame -> True, 
                  AxesOrigin -> {-1, 0}, 
                  PlotMarkers -> 
                  With[{markerSize = 0.04}, {Graphics[{Lighter[Blue, #], Disk[]}], 
                       markerSize} & /@Range[9/10, 0, -1/10]], Filling -> Axis, 
                  FillingStyle -> Opacity[0.8], 
                  PlotRange -> {{.5, 1100}, {540, 600}},
                  ImageSize->400];

Grid[{{intensityLegend, FindD1}, {intensityLegend, FindD1}}, 
      ItemSize -> {50, 20}, Frame -> True]

enter image description here

How could I get the legend Column Size to Fit the Height of the Plot Area ?

While Row adjust the size I need to use Grid. This is why I duplicated in grid.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-26T07:09:27+00:00Added an answer on May 26, 2026 at 7:09 am

    Working with Image Sizes. The (* <- *) marks the important modifications to your code, the rest are mainly font size thingies:

    intense = Reverse[Round[Rationalize /@ N[10^Range[0, 3, 1/3]]]];
    values = Range[0, 9/10, 1/10];
    imgSize = 400;                                                          (* <- *) 
    Off[Ticks::ticks]
    
    IntersectionDp1 =  {{1., 588.377},     {2.15443, 580.306}, {4.64159, 573.466}, 
       {10., 560.664}, {21.5443, 552.031}, {46.4159, 547.57},  {100., 545.051},
       {215.443, 543.578}, {464.159, 542.281}, {1000., 541.346}}
    
    FindD1 = ListLogLinearPlot[Map[List, IntersectionDp1], Frame -> True, 
       AxesOrigin -> {-1, 0}, 
       PlotMarkers -> 
        With[{markerSize = 0.04}, 
         {Graphics[{Lighter[Blue, #], Disk[]}], markerSize} & 
           /@ Range[9/10, 0, -1/10]], Filling -> Axis, FillingStyle -> Opacity[0.8], 
           PlotRange -> {{.5, 1100}, {540, 600}}, ImageSize -> imgSize];    (* <- *) 
    
    intensityLegend =
      Rasterize[Column[
        Prepend[
         Reverse@MapThread[                                                 (* <- *) 
          Function[{intensity, values}, 
           Row[{Graphics[{(Lighter[Blue, values]), 
               Rectangle[{0, 0}, {4, 1}], Black, 
               Text[Style[ToString[intensity], 30, Bold], {2, .5}]}]}]],
          {intense, values}],
         Text[Style["Photons Number", Bold, 25]]]], 
       ImageSize -> {Automatic,                                             (* <- *) 
         IntegerPart@                            
          First[imgSize Cases[AbsoluteOptions[FindD1], 
             HoldPattern[AspectRatio -> x_] -> x]]}];
    
    Grid[{{intensityLegend, FindD1}, {intensityLegend, FindD1}}, Frame -> True]
    

    enter image description here

    Where I reversed the intensities column for aesthetic purposes.

    Edit

    If you don’t explicitly specify the ImageSize option for the Plot, you’ll disappointingly find that AbsoluteOptions[Plot, "ImageSize"] returns "Automatic" !

    Edit Answering the @500’s comment bellow

    The expression:

       ImageSize -> {Automatic,                                             (* <- *) 
         IntegerPart@                            
          First[imgSize Cases[AbsoluteOptions[FindD1], 
             HoldPattern[AspectRatio -> x_] -> x]]}];
    

    is really a working replacement for something that should work but doesn’t to get the image size of a Plot:

       ImageSize -> {Automatic, Last@AbsoluteOptions[FindD1,"ImageSize"]}   
    

    So, what the IntegerPart[...] thing is doing is getting the vertical size of the plot image, multiplying imgSize by the AspectRatio of the Plot.
    To understand how it works, run the code and then type:

    AbsoluteOptions[FindD1] 
    

    and you will see the Plot options there. Then the Cases[] function is just extracting the AspectRatio option.

    In fact there is a cleaner way to do what the Cases[] does. It is:

    AbsoluteOptions[FindD1,"AspectRatio"] 
    

    but there is another bug in the AbsoluteOptions function that prevents us to use it this way.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Please consider simple function: def fun(x, y, param1=10, param2=param1/3): do something Where param1 and
Please consider the two following snippets of code: (function f() { var x; try
Please consider the following function body: var isValidated = true; $(selector1).each(function(){ //do validation with
Please Consider the following table : As you can see the Name column has
Please consider the following class. I'm beginning to use JQuery. function AutoHide(elemControl, elemContent) {
Please consider this example. (PHP) class Database{ private $result; private $conn; function query($sql){ $result
Please consider my question. final values cannot be changed in java. private final List<Integer>
Please consider this example class: [Serializable] public class SomeClass { private DateTime _SomeDateTime; public
Please consider the following: <td style=width: 500px;> <div style=width: 400px;>SomeContent</div> </td> For some reason,
Please consider the following fork() / SIGCHLD pseudo-code. // main program excerpt for (;;)

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.