WxMaxima draw2d switch Y-axis value range

  • Thread starter mzu
  • Start date

mzu

10
0
Hi,

Hopefully someone can help. I was some pretty simple code to make a H-R Diagram in wxMaxima. The Absolute magnitude on the H-R Diagram should go from 20 to -15. wxMaxima only allows me enter the Y-axis range from -15 to 20 so the values on this axis are the other way around. I can draw the diagram from -15 to 20 and then go into the GNU Plot command line and change the values from 20 to -15 and re-plot from within GNU Plot. I was wondering if it possible to do this from wxMaxima directly so I don't have to change this afterwards all the time. I hope the explanation is a little clear. Here is the code:

Stars: [[0.63,4.8],[0,1.4],[0.15,-2.5],[1.23,0.2],[0.71,4.4]];

load(draw);

draw2d(
xrange=[-0.3,2.2],
yrange=[-15,20],
points(data),

title = "HR Diagram",
xlabel = "B-V",
ylabel = "Absolute Magnitude");

As you can see the yrange goes from -15 to 20. If I enter 20,-15 I get an illegal error. Most of the times it is correct to have the yrange from min to max but on the H-R Diagram it has to be the other way around. Again, this can be done in the GNU Plot command line but I was wondering if this can be done from wxMaxima directly.

Thanks in advance for any help,
Michael
 

Want to reply to this thread?

"WxMaxima draw2d switch Y-axis value range" You must log in or register to reply here.

Physics Forums Values

We Value Quality
• Topics based on mainstream science
• Proper English grammar and spelling
We Value Civility
• Positive and compassionate attitudes
• Patience while debating
We Value Productivity
• Disciplined to remain on-topic
• Recognition of own weaknesses
• Solo and co-op problem solving
Top