Skip to main content
added 3 characters in body
Source Link
Sos
  • 2.2k
  • 16
  • 31

Edit: The new package to install for this comes from the CustomTicks subpackage of the SciDraw package (formerly, LevelScheme).

You first have to install the SciDraw package, it's worth it if you produce a lot of figures. You can see how to do it on the SciDraw guide.

Load the package that you will be using

Get["CustomTicks`"]

Assign a function and do the 3D plot:

function = Log[10, a x + b /. a -> 1];
Plot3D[function, {x, 1, 3}, {b, -1, 3}, 
 PlotRange -> {{1, 3}, {-1, 3}, {-1, 1}}, 
 Ticks -> {LogTicks[10, 1, 3], LogTicks[10, -1, 3], LogTicks[10, -1, 1]}
]

This would produce this figure:

enter image description here

If you wanted to have the yy axis with linear ticks instead you could adapt the Ticks option above. Here, I also changechanged the PlotRange specification and addadded an AxesLabel so that it is easier to see.

Plot3D[function, {x, 1, 3}, {b, -1, 3}, 
 PlotRange -> {{1, 2}, {-1, 0}, {-1, 1}}, 
 Ticks -> {LogTicks[10, 1, 3], LinTicks[-1, 0, 0.25, 5], 
   LogTicks[10, -1, 3]}, AxesLabel -> {"x", "y", "z"}]

enter image description here

The SciDraw (and more specifically the CustomTicks) package is really nice to do these things!

Edit: The new package to install for this comes from the CustomTicks subpackage of the SciDraw package (formerly, LevelScheme).

You first have to install the SciDraw package, it's worth it if you produce a lot of figures. You can see how to do it on the SciDraw guide.

Load the package that you will be using

Get["CustomTicks`"]

Assign a function and do the 3D plot:

function = Log[10, a x + b /. a -> 1];
Plot3D[function, {x, 1, 3}, {b, -1, 3}, 
 PlotRange -> {{1, 3}, {-1, 3}, {-1, 1}}, 
 Ticks -> {LogTicks[10, 1, 3], LogTicks[10, -1, 3], LogTicks[10, -1, 1]}
]

This would produce this figure:

enter image description here

If you wanted to have the yy axis with linear ticks instead you could adapt the Ticks option above. Here, I also change the PlotRange specification and add an AxesLabel so that it is easier to see.

Plot3D[function, {x, 1, 3}, {b, -1, 3}, 
 PlotRange -> {{1, 2}, {-1, 0}, {-1, 1}}, 
 Ticks -> {LogTicks[10, 1, 3], LinTicks[-1, 0, 0.25, 5], 
   LogTicks[10, -1, 3]}, AxesLabel -> {"x", "y", "z"}]

enter image description here

The SciDraw (and more specifically the CustomTicks) package is really nice to do these things!

Edit: The new package to install for this comes from the CustomTicks subpackage of the SciDraw package (formerly, LevelScheme).

You first have to install the SciDraw package, it's worth it if you produce a lot of figures. You can see how to do it on the SciDraw guide.

Load the package that you will be using

Get["CustomTicks`"]

Assign a function and do the 3D plot:

function = Log[10, a x + b /. a -> 1];
Plot3D[function, {x, 1, 3}, {b, -1, 3}, 
 PlotRange -> {{1, 3}, {-1, 3}, {-1, 1}}, 
 Ticks -> {LogTicks[10, 1, 3], LogTicks[10, -1, 3], LogTicks[10, -1, 1]}
]

This would produce this figure:

enter image description here

If you wanted to have the yy axis with linear ticks instead you could adapt the Ticks option above. Here, I also changed the PlotRange specification and added an AxesLabel so that it is easier to see.

Plot3D[function, {x, 1, 3}, {b, -1, 3}, 
 PlotRange -> {{1, 2}, {-1, 0}, {-1, 1}}, 
 Ticks -> {LogTicks[10, 1, 3], LinTicks[-1, 0, 0.25, 5], 
   LogTicks[10, -1, 3]}, AxesLabel -> {"x", "y", "z"}]

enter image description here

The SciDraw (and more specifically the CustomTicks) package is really nice to do these things!

Edited post with changes about package installation and added one new example based on comments
Source Link
Sos
  • 2.2k
  • 16
  • 31

Edit: The new package to install for this comes from the CustomTicks subpackage of the SciDraw package (formerly, LevelScheme).

You first have to install the LevelScheme packageSciDraw package, it's worth it if you produce a lot of figures. You can see how to do it on the SciDraw guide.

Load the package: that you will be using

<< LevelSchemeGet["CustomTicks`"]

Assign a function and do the 3D plot:

function = Log[10, a x + b /. a -> 1];
Plot3D[function, {x, 1, 3}, {b, -1, 3}, 
 PlotRange -> {{1, 3}, {-1, 3}, {-1, 1}}, 
 Ticks -> {LogTicks[10, 1, 3], LogTicks[10, -1, 3], LogTicks[10, -1, 1]}
]

This would produce this figure:

enter image description here

If you wanted to have the yy axis with linear ticks instead you could adapt the LevelSchemeTicks option above. Here, I also change the PlotRange specification and add an AxesLabel so that it is easier to see.

Plot3D[function, {x, 1, 3}, {b, -1, 3}, 
 PlotRange -> {{1, 2}, {-1, 0}, {-1, 1}}, 
 Ticks -> {LogTicks[10, 1, 3], LinTicks[-1, 0, 0.25, 5], 
   LogTicks[10, -1, 3]}, AxesLabel -> {"x", "y", "z"}]

enter image description here

The SciDraw (and more specifically the Custom Ticks packageCustomTicks) package is really nice to do these things!

You first have to install the LevelScheme package, it's worth it if you produce a lot of figures.

Load the package:

<< LevelScheme

Assign a function and do the 3D plot:

function = Log[10, a x + b /. a -> 1];
Plot3D[function, {x, 1, 3}, {b, -1, 3}, 
 PlotRange -> {{1, 3}, {-1, 3}, {-1, 1}}, 
 Ticks -> {LogTicks[10, 1, 3], LogTicks[10, -1, 3], LogTicks[10, -1, 1]}
]

This would produce this figure:

enter image description here

LevelScheme (and more specifically the Custom Ticks package) is really nice to do these things!

Edit: The new package to install for this comes from the CustomTicks subpackage of the SciDraw package (formerly, LevelScheme).

You first have to install the SciDraw package, it's worth it if you produce a lot of figures. You can see how to do it on the SciDraw guide.

Load the package that you will be using

Get["CustomTicks`"]

Assign a function and do the 3D plot:

function = Log[10, a x + b /. a -> 1];
Plot3D[function, {x, 1, 3}, {b, -1, 3}, 
 PlotRange -> {{1, 3}, {-1, 3}, {-1, 1}}, 
 Ticks -> {LogTicks[10, 1, 3], LogTicks[10, -1, 3], LogTicks[10, -1, 1]}
]

This would produce this figure:

enter image description here

If you wanted to have the yy axis with linear ticks instead you could adapt the Ticks option above. Here, I also change the PlotRange specification and add an AxesLabel so that it is easier to see.

Plot3D[function, {x, 1, 3}, {b, -1, 3}, 
 PlotRange -> {{1, 2}, {-1, 0}, {-1, 1}}, 
 Ticks -> {LogTicks[10, 1, 3], LinTicks[-1, 0, 0.25, 5], 
   LogTicks[10, -1, 3]}, AxesLabel -> {"x", "y", "z"}]

enter image description here

The SciDraw (and more specifically the CustomTicks) package is really nice to do these things!

deleted 1 character in body
Source Link
Sos
  • 2.2k
  • 16
  • 31

You first have to install the LevelScheme package, it's worth it if you produce a lot of figures.

Load the package:

<< LevelScheme`LevelScheme

Assign a function and do the 3D plot:

function = Log[10, a x + b /. a -> 1];
Plot3D[function, {x, 1, 3}, {b, -1, 3}, 
 PlotRange -> {{1, 3}, {-1, 3}, {-1, 1}}, 
 Ticks -> {LogTicks[10, 1, 3], LogTicks[10, -1, 3], LogTicks[10, -1, 1]}
]

This would produce this figure:

enter image description here

LevelScheme (and more specifically the Custom Ticks package) is really nice to do these things!

You first have to install the LevelScheme package, it's worth it if you produce a lot of figures.

Load the package:

<< LevelScheme`

Assign a function and do the 3D plot:

function = Log[10, a x + b /. a -> 1];
Plot3D[function, {x, 1, 3}, {b, -1, 3}, 
 PlotRange -> {{1, 3}, {-1, 3}, {-1, 1}}, 
 Ticks -> {LogTicks[10, 1, 3], LogTicks[10, -1, 3], LogTicks[10, -1, 1]}
]

This would produce this figure:

enter image description here

LevelScheme (and more specifically the Custom Ticks package) is really nice to do these things!

You first have to install the LevelScheme package, it's worth it if you produce a lot of figures.

Load the package:

<< LevelScheme

Assign a function and do the 3D plot:

function = Log[10, a x + b /. a -> 1];
Plot3D[function, {x, 1, 3}, {b, -1, 3}, 
 PlotRange -> {{1, 3}, {-1, 3}, {-1, 1}}, 
 Ticks -> {LogTicks[10, 1, 3], LogTicks[10, -1, 3], LogTicks[10, -1, 1]}
]

This would produce this figure:

enter image description here

LevelScheme (and more specifically the Custom Ticks package) is really nice to do these things!

I added the link to the newer version of the LevelScheme package
Source Link
Loading
added 20 characters in body
Source Link
rcollyer
  • 34.1k
  • 7
  • 94
  • 194
Loading
Source Link
Sos
  • 2.2k
  • 16
  • 31
Loading